.h file
@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 file
@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
the application crashes when ever AMethod is called iget following warning
warning: incompatible pointer types sending 'int [10][5]' to parameter of type 'int **' [-pedantic]
int**and(*int)[5]are not the same