65,210
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
#include <string>
#include <tchar.h>
using namespace std;
int main()
{
TCHAR str[] = _T("新年好");//这里就是unicode
wcout.imbue(locale("chs"));
wcout<<str<<endl;
return 0;
}
#include <iostream>
#include <string>
using namespace std;
int main()
{
wchar_t str[] = L"新年好";//这里就是unicode
wcout.imbue(locale("chs"));
wcout<<str<<endl;
return 0;
}
#include <iostream>
#include <string>
using namespace std;
int main()
{
wstring str = L"新年好";//这里就是unicode
wcout.imbue(locale("chs"));
wcout<<str<<endl;
return 0;
}