C++ sprintf_s 字符串拼接:定義一個buf 格式如下:
char buf[128] = {0};
例子:
sprintf_s(buf,128,"%s%d",appGetGlobal()->getText("id"),appGetGlobal()->getVersion());
m_versionLabel = CCLabelTTF::create(buf,"Arial",20,CCSizeMake(200,25),kCCTextAlignmentLeft,kCCVerticalTextAlignmentCenter);