CString 和string 相互转换

来源:互联网 发布:source insight有linux 编辑:程序博客网 时间:2024/06/11 15:51

CString cstr1 = "The CString";
 string str;

 CString cstr2;
 string str2 = "The string";

 str = cstr1.GetBuffer(0);  //CString To string
 cstr2 = str2.c_str();         //string To CString

zz from http://beetle082.blog.163.com/blog/static/70026724200874102311273/