Should I use std::string instead of CCString?

I see that CCString is marked as deprecated in v. 2.2.2.

Should I use std::string instead? And if so, would CC_SYNTHESIZE_PASS_BY_REF(std::string, email, Email) be a good way of implementing string properties? Are there any gotchas with this usage of std::string as object properties?

Thanks! :slight_smile:

You may use Value type
http://www.cocos2d-x.org/reference/native-cpp/V3.0beta2/dc/dd1/classcocos2d_1_1_value.html

Thanks @jyosh! I didn’t know that one. For future reference, I used CC_SYNTHESIZE(cocos2d::Value, email, Email) since cocos2d::Value is not an autorelease object. Works fine! :slight_smile: