MFC中CString 与char*相互转化

CString->char*


CString str = _T("1234");
USES_CONVERSION;
char* p = T2A(str.GetBuffer(0));
str.ReleaseBuffer();
char*->CString

char* pData = "1234";
CString strData(pData);
下面这个链接写的挺详细的,现在还看不太明白,先保留着:

CString与char*互转、ANSI 和 UNICODE 编码及_T和L宏定义的介绍
 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章