I am reading a book: C: In a nutshell, and after reading the section "Character Sets", which talks about wide characters, I wrote this program:
#include <stdio.h> #include <stddef.h> #include <wchar.h> int main() { wchar_t wc = '\x3b1'; wprintf(L"%lc\n", wc); return 0; }
Then I compiled it with gcc, but gcc gave me this warning:
main.c: 7: 15: warning: hexadecimal escape sequence out of range [enabled by default]
And the program does not display the character α (whose unicode is U + 03B1), which I wanted to do.
How to change the program for printing the character α?
Yishu fang
source share