- std::string转换为:NSString
string s = str("hello");;
NSString *str = [NSString stringWithCString:s.c_str() encoding:[NSString defaultCStringEncoding]];
2.NSString转换为std::string
NSString *str = @"hello";
string s = [str UTF8String];
string s = str("hello");;
NSString *str = [NSString stringWithCString:s.c_str() encoding:[NSString defaultCStringEncoding]];
2.NSString转换为std::string
NSString *str = @"hello";
string s = [str UTF8String];