您当前的位置: 首页 >  ar

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

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

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             
关注
打赏
1688896170
查看更多评论
0.0576s