#include <iostream>
#include <string>
using namespace std;
//////////////////////////////////////////////////(UNICODE 环境)
std::string TCHAR2STRING(TCHAR *STR)
{
int iLen = WideCharToMultiByte(CP_ACP, 0,STR, -1, NULL, 0, NULL, NULL);
char* chRtn =new char[iLen*sizeof(char)];
WideCharToMultiByte(CP_ACP, 0, STR, -1, chRtn, iLen, NULL, NULL);
std::string str(chRtn);
return str;
}
TCHAR 转换 string
最新推荐文章于 2024-01-18 14:10:02 发布