Re: How to store C Arrays as a Property or iVar?
You can't assign (or compare) arrays in C/C++. You have two options: (a) Call memcpy: memcpy(&myArray, &_mArray, sizeof(myArray)); (b) Wrap a struct around the array, since structs are copyable. Drawback is that you now have to refer to the array as a named field of the struct. typedef struct { int [10][10] a; } MyArrayType; MyArrayType myArray; … _mArray = myArray; (This is a pure C issue, so a book like K&R would be helpful.) —Jens |
|