Visual Studio 2010 'snprintf': identifier not found

snprintf is not part of C89. It's standard only in C99. Microsoft has no plan supporting C99.

(But it's also standard in C++0x...!)

You could still use
#if _MSC_VER
#define snprintf _snprintf_s
#endif

as a workaround.

so we can use the following code with cocos2d-x while in windows
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
#define snprintf _snprintf_s
#endif


参考:http://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010

你可能感兴趣的:(printf)