I want to do achieve something like this in Objective-C
+(int[10][10])returnArray
{
int array[10][10];
return array;
}
However, thi
Another way you can do it with objective C++, is to declare the array as follows:
@interface Hills : NSObject
{
@public
CGPoint hillVertices[kMaxHillVertices];
}
This means the array is owned by the Hills class instance - ie it will go away when that class does. You can then access from another class as follows:
_hills->hillVertices
I prefer the techniques Carl Norum describes, but wanted to present this as an option that might be useful in some cases - for example to pass data into OpenGL from a builder class.