- std::string 与 NSString 互转
std::string name = [heroName cStringUsingEncoding:NSString.defaultCStringEncoding];
NSString *nameMessage = [NSString stringWithCString:name.c_str()
encoding:[NSString defaultCStringEncoding]];
std::string name = [heroName cStringUsingEncoding:NSString.defaultCStringEncoding];
NSString *nameMessage = [NSString stringWithCString:name.c_str()
encoding:[NSString defaultCStringEncoding]];
本文标题:Objective-C 与 C++
本文链接:https://www.haomeiwen.com/subject/cxbzehtx.html
网友评论