Another way you can do this with object C ++ is to declare an array as follows:
@interface Hills : NSObject { @public CGPoint hillVertices[kMaxHillVertices]; }
This means that the array belongs to an instance of the Hills class, i.e. he will disappear when this class does. Then you can access from another class as follows:
_hills->hillVertices
I prefer the methods described by Carl Norum, but I wanted to present this as an option that can be useful in some cases, for example, for transferring data to OpenGL from the builder class.
source share