cocos2d-x-3.17.2 Window 10:
1. CCLog(const char * pszFormat, ...): 位于 CCDeprecated.h下,此函数已被标记为弃用,不应该再用.
2. log(const char * format, ...): 位于 CCConsole.h 下.
log("hello");
log("number: %d", 1997)
// 输出:
//hello
//number: 1997
3. 宏 CCLOG(format, ...): 位于 CCPlatformMacros.h 下, 注意所有字母都是大写.
CCLOG("hello");
CCLOG("number: %d", 1997)
CCLOG("decimals: %ld", 650000L);
CCLOG("Preceding with blanks: %10d", 1977);
CCLOG("Preceding with zeros: %010d", 1977);
CCLOG("Some different radixes: %d %x %o %#x %#o", 100, 100, 100, 100, 100);
CCLOG("Floats: %4.2f %.0e %E", 3.1416, 3.1416, 3.1416);
// 输出:
//hello
//number: 1997
//decimal