宽字符

 1 #include<stdlib.h>
 2 #include<iostream>
 3 #include<locale>
 4 
 5 int main()
 6 {
 7     setlocale(LC_ALL, "chs");// 设置本地化
 8     wchar_t *p1 = L"123456";
 9     std::wcout << p1 << std::endl;
10 
11     wchar_t *p2 = L"上海123456";
12     std::wcout << p2 << std::endl;
13 
14     system("pause");
15     return 0;
16 }

 

posted on 2015-05-30 20:51  Dragon-wuxl  阅读(107)  评论(0)    收藏  举报

导航