cli/c++.net string,String^与CSting之间最方便转换
1:std::string转String^:std::string stdstr="";
String^ str = marshal_as<String^>(stdstr);
2:String^转std::string:
String^ str= gcnew String();
std::string stdstr = marshal_as<std::string>(str->ToString());
3:CString转Sting^:
CString cstr="";
String^ str = marshal_as<String^>(cstr.GetBuffer());
cstr.ReleaseBuffer();
4:String^转CString:
String^ str;
CString cstr(str);
补充:.NET技术 , 非技术区