Hi I am trying to init an object with a double value in the format double filter[3][3]; but i keep getting the following error.
cannot convert 'double[3][3]' to 'double' in assignment.
in my header i have this
@interface filter : NSObject
{
double **matrix;
}
@property(nonatomic)double **matrix;
-(id)initWithMatrix:(double**)filterMatrix;
inside my class i have this method.
-(id)initWithMatrix:(double**)filterMatrix
{
matrix = filterMatrix;
return self;
}
and i am trying to call it like this.
double filter[3][3] = {0,0,0,0,1,0,0,0,0};
MyMatrix *myMatrix = [[MyMatrix alloc] initWithMatrix:filter];
I now get the error.
Error: Cannot convert double[*][3] to double** in argument passing
Any help on this issue would be amazing. Thanks A