I started using cocos2dx 3 days ago, so I’m a n00b, anyway, I’m following this tutorial http://www.raywenderlich.com/12022/how-to-make-a-turn-based-strategy-game-part-1
And it makes use of circular reference, so I had a problem with the next part
class HelloWorld …
CCArray* tileDataArray; //no NSMutableArray on cocos2dx so I made use of CCArray
class Unit …
I need to access from the Unit class to the tileDataArray of the HelloWorld class at the moment the ccTouchBegan function is dispatched, and that’s the problem, if I try to read the tileDataArray the application crashes with a *Segmentation fault (core dumped)*
any idea of how to solved it? do I have to change the architecture avoiding this class of circular reference ?