标签:
代码如下:
HelloWorldScene.h #ifndef __HELLOWORLD_SCENE_H__ #include "cocos2d.h" // Here‘s a difference. Method ‘init‘ in cocos2d-x returns bool, instead of returning ‘id‘ in cocos2d-iphone // a selector callback bool onContactBegin(const PhysicsContact& contact);
#endif // __HELLOWORLD_SCENE_H__ |
报错:
Error 4 error C2061: syntax error : identifier ‘Touch‘ (..\Classes\AppDelegate.cpp) e:\cocos2d-x\samples\hello\classes\helloworldscene.h 19 1 hello |
解决方法:
在行#include "cocos2d.h"下增加如下代码行:
USING_NS_CC;
标签:
原文地址:http://www.cnblogs.com/jerry1999/p/4392892.html