方法一:
USES_CONVERSION;
char* ss= T2A(s);
方法二:
const char* GetConstChar(CString str)
{
int len = WideCharToMultiByte(CP_UTF8, 0, str.AllocSysString(), str.GetLength(), NULL, 0, NULL, NULL);
char* pAscii = new char[len + 1];
len = WideCharToMultiByte(CP_UTF8, 0, str.AllocSysString(), str.GetLength(), pAscii, len + 1, NULL, NULL);
pAscii[len] = 0;
const char* cchar = (const char*)pAscii;
return cchar;
}