1
多字节字符集:char *strcpy(char *strDestination, const char *strSource);
Unicode字符集:wchar_t *wcscpy(wchar_t *strDestination, const wchar_t *strSource);
通用:_tcscpy
#ifdef UNICODE
#define _tcscpy wcscpy
#else
#define _tcscpy strcpy
#endif
2
CString String2CString(std::string str)
{
CString cstr;
cstr = CA2T(str.c_str());//CA2T是与编码方式有关的宏定义
return cstr;
}
std::string CString2String(CString cstr)
{
std::string str;
str = CT2A((LPCTSTR)cstr);//CT2A是与编码方式有关的宏定义
return str;
}