But if I get the words from a plist, the “world” doesn’t start from a new line, only print out “hello world”, here is the code:
CCMutableDictionary *localDic = new CCMutableDictionary();
localDic = CCFileUtils::dictionaryWithContentsOfFile(fileName);
CCString* s = (CCString*)localDic->objectForKey("testkey"); // the value for 'testkey' is "hello \n world"
pLabel = CCLabelBMFont::labelWithString(s->toStdString().c_str(), "test.fnt");
I’m using cocos2d-1.0.1-x-0.13.0, thanks for help.