1、cocos2dx中自带了存储类:CCUserDefault
//逻辑类型getBoolForKey
//小数型getFloatForKey
//字符串型std::stringgetStringForKey
注释:#include"string"
if(!CCUserDefault::sharedUserDefault()->getIntegerForKey("key"))
{
setIntegerForKey,45);
flush();
}else
::
}