84.setlocale

用法示例

 1 #include <Windows.h>
 2 #include <stdio.h>
 3 #include<locale.h>
 4 
 5 
 6 void main()
 7 {
 8     //setlocale(LC_CTYPE, "chs");
 9     setlocale(LC_ALL, "zh-CN");
10     wchar_t wstr[100] = L"hello你好";
11     wprintf(L"%ls", wstr);
12     getchar();
13 }

 

posted @ 2018-02-22 09:11  喵小喵~  阅读(126)  评论(0编辑  收藏  举报