
Label::_label;
if(_label==NULL){
//初始化_label的代码
}
//指针默认值不等于NULL,需要赋初始值Label::_label=NULL;
string str="name is lao wang";
cocos2d::log(str);//这是错误的
cocos2d::log("%s",str);//这是错误的 cocos2d::log(str.c_str());//这才能正确输出
cocos2d::log("%s",str.c_str());//这才能正确输出
std::string str="ab"+"cd";//这是错误的 //正确写法
std::string str="ab";
str+="cd";
log(str.c_str());//输出:abcd