Where is CCFloat/CGFloat defined?

Where is CCFloat/CGFloat defined?
0.0 0


Hi Mr. Wang,

I’m just a beginner in COCOS2D-X, but with a bit knowledge about WiEngine before. Now, for some reason I’m shifting to COCOS2D-X with the new version 2.0.2. So, I found a good tutorial in the URL http://www.cocos2d-x.org/boards/6/topics/4391. However, it was based upon a old version of COCOS2D-X, there being a lot required to be improved or modified.

Now, one of my puzzles is when I built the project of mac andy’Catapult Shooting Game there’s thrown an error concerning the string type ‘CGFloat’. I searched all the stuff under the folder COCOS2D-X, but found nearly nothing with it, just a short statement (Bug #1160: rename ‘CGFloat’ to ‘CCFloat’) in the file CHANGELOG. But, even I changed CGFloat into CCFloat, I still got the similar error info. Of course, I can use float on the WIN32 platform, but will there be some trouble when I shift the project later on to my Android environment? Anxious to see your guidance and thanks in advance.


You should just use ‘float’.


Thanks for so quick answer.