#include <stdio.h> #include <stdlib.h> #include <io.h> #include <fcntl.h> #define PICCHE L"\u2660" #define FIORI L"\u2663" #define CUORI L"\u2665" #define QUADRI L"\u2666" int main() { _setmode(_fileno(stdout), _O_U16TEXT); printf ("A\n" QUADRI); printf ("K\n" FIORI); printf ("Q\n" CUORI); printf ("J\n" PICCHE); _setmode(_fileno(stdout), _O_TEXT); return 0; }
#include <stdio.h> int main () { printf ("%c",5); return 0; }
// crt_setmodeunicode.c // This program uses _setmode to change // stdout to Unicode. Cyrillic and Ideographic // characters will appear on the console //(if your console font supports those character sets). -- this part is very important! #include <fcntl.h> #include <io.h> #include <stdio.h> int main(void) { _setmode(_fileno(stdout), _O_U16TEXT); wprintf(L"\x043a\x043e\x0448\x043a\x0430 \x65e5\x672c\x56fd\n"); //wprintf is used instaed of printf return 0; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)