C语言wchar_t使用
作者:互联网
#include <wchar.h>
#include <locale.h>
int main()
{
wchar_t a[] = L"gcc编译然后运行";
wchar_t *b = L"ni";
setlocale(LC_ALL, "zh_CN.UTF-8");
wprintf(L"中文测试:%ls %ls\n", a, b);
wprintf(L"wchar_t长度:%zu\n", sizeof(wchar_t));
return 0;
}
标签:zh,setlocale,wprintf,C语言,ls,使用,wchar,include 来源: https://www.cnblogs.com/kevinjen/p/16523992.html