通过cocos2d-x v3中的notificationcenter传递std:string?

通过cocos2d-x v3中的notificationcenter传递std:string?,cocos2d-x,notificationcenter,Cocos2d X,Notificationcenter,有人能告诉我如何通过cocos2d-xv3中的notificationcenter传递std:string吗? 谢谢 NotificationCenter::getInstance()->postNotification(“显示游戏结束”,??) 注意事项的可能重复:将std::string转换为ccstring不看,我认为需要一个Ref*,所以@learncos2d关于将std::string转换为cococos2d::Value的说明应该有效。@GameDeveloper我使用cococos

有人能告诉我如何通过cocos2d-xv3中的notificationcenter传递std:string吗? 谢谢


NotificationCenter::getInstance()->postNotification(“显示游戏结束”,??)

注意事项的可能重复:将std::string转换为ccstring不看,我认为需要一个
Ref*
,所以@learncos2d关于将std::string转换为
cococos2d::Value
的说明应该有效。@GameDeveloper我使用cococos2d::Value,但它会出错。cocos2d:价值ss(“某物”);NotificationCenter::getInstance()->postNotification(“显示游戏结束”,ss);早上让我看看。