您当前的位置: 首页 >  ar

txwtech

暂无认证

  • 3浏览

    0关注

    813博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

4a-c++ primer宽字符wchar_t显示设置与输出代码示例

txwtech 发布时间:2019-11-03 12:38:25 ,浏览量:3

char a[] = "大家好吗";  printf("%s\n",a);  wchar_t bb1= L'好';  wchar_t bb2[] = L"需要多测试";  printf("%c\n",'x');  setlocale(LC_ALL, "chs");//需要设置语言,宽字符才会显示  wprintf(L"%lc\n",L'显');  wprintf(L"%lc\n", bb1);  wprintf(L"%ls\n", bb2);  wprintf(L"%lc\n", bb2[4]);  wprintf(L"%lc\n", bb2[0]);

#include 
#include 
#include 
//#include
//#include 
int main()
{
	short sh;
	unsigned short sh1;
	sh = 100000;
	sh1 = 100000;
	std::cout             
关注
打赏
1665060526
查看更多评论
0.0374s