Does anyone use a lot of C arrays in Objective-C? If anyone could help me out that would be great. I have a handle with NSArrays, but I think a C array would be a little cleaner for what I'm trying to do.
I guess I was looking for something like this:
@interface myObject: NSObject
{
. . .
int matrix[3][5];
. . .
}
-(void) setMatrix: (int) newMatrix
{
matrix = newMatrix
}
I can't figure out how to write the setter. I've having a hard time figuring out how to pass *newMatrix* as an argument over to *setMatrix*.
I guess my question is that if I have some newMatrix that is 3 x 5, how could I write the method to set the matrix in my object to this newMatrix?
I guess I was looking for something like this:
@interface myObject: NSObject
{
. . .
int matrix[3][5];
. . .
}
-(void) setMatrix: (int) newMatrix
{
matrix = newMatrix
}
I can't figure out how to write the setter. I've having a hard time figuring out how to pass *newMatrix* as an argument over to *setMatrix*.
I guess my question is that if I have some newMatrix that is 3 x 5, how could I write the method to set the matrix in my object to this newMatrix?