.h файл
@interface GameState :NSObject{
int SymbolsPositions[3][5];
}
-(void)SaveCurrentGameState:(int **)Array;
@end
@interface GameViewController : UIViewController
{
...
int sequence_after_spin[3][5];
...
}
-(Void)AMethod;
@end
.m файл
@implementation GameState
-(void)SaveCurrentGameState:(int **)Array
{
for(int i = 0;i<5;i++)
for(int j = 0;j<3;j++)
NSLog(@" %d",Array[j][i]);
}
@end
@implimentation GameViewController
-(void)AMethod
{
[instanceOfGameState SaveCurrentGameState:sequence_after_spin];
}
@end
приложение аварийно завершает работу, когда когда-либо вызывается AMethod, iget после предупреждения
warning: incompatible pointer types sending 'int [10][5]' to parameter of type 'int **' [-pedantic]