CString和string的互相轉換


http://www.cppblog.com/yuanyajie/archive/2006/12/14/16427.html

 

CString->std::string 例子:

CString strMfc=“test“;

std::string strStl;

strStl=strMfc.GetBuffer(0);

std::string->CString  例子:

CString strMfc;

std::string strStl=“test“;

strMfc=strStl.c_str();
發佈了146 篇原創文章 · 獲贊 13 · 訪問量 71萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章