#include <iostream>
#include <locale.h> // 头文件,
#include <wchar.h>
#include <stdlib.h>
int main ()
{
char x = 'a';
wchar_t y = L'是';// 宽字符可以表示除英文之外的其它的字符, 注意表示方法,
printf("%c\n", 'B'); //"%c\n"是字符串,
setlocale(LC_ALL, "chs");
wprintf(L"%lc\n", L'爱'); // 宽字符,
return 0;
}
char的字面值
最新推荐文章于 2024-06-13 23:56:20 发布