Asserts all over the place

Asserts all over the place
0.0 0


I’m pretty new to cocos2dx (and iOS development and xcode4 and c++ and pretty much everything), and I just have some questions about all the assert() lines hiding in the code. I understand they’re for critical error checks and I try to work around them, but when I run into one I have no idea why I tripped it or what I need to do to fix the problem.

Is there a way to get debug info as to what each assert() is there to protect against, or do I just need to keep mixing things up until I stop getting them?


hello, assert(cond) means that the code should meet some demands then the programe could run well.
when they are not hit, you could ignore them, but when you get them, you’d better find out why they are hit, or else, the program may have problems.

there are many tests in cocos2dx, they are good sources to study for cocos2dx new hands.