CString->char*
CString strSource;//宣告CString char* charSource; //宣告char* 法1: charSource = (char*)strSource.GetBuffer(0); 法2: charSource = (char*)strSource.GetBuffer(strSource.GetLength()); 法3: charSource = (char*)(LPCTSTR)strSource;
char*->CString
char* temp; .... //生成我们需要的CString对象 CString str(temp);
char*->LPCTSTR
char* res=..; LPCTSTR lpc; lpc = (LPCTSTR)(LPCTSTR)res;
原文地址:https://www.cnblogs.com/jakejian/p/9141360.html
时间: 2024-10-10 04:24:31