windows 10 code blocks problem

I just got from windows 7 to windows 10 programming in c++ and i can't use some of the old ascii characters such as the smiley faces. how can i fix this ? thanks
There is no smiley face in the ASCII character set.

https://en.wikipedia.org/wiki/ASCII#Character_set
The way that characters outside of the range defined by the ASCII standard are displayed will depend on the code page in use.

Commonly used values are 437 and 1252.

You might try
 
    SetConsoleOutputCP( n );

where n is the number of the required code page.

needs #include <windows.h>

See https://docs.microsoft.com/en-us/windows/console/setconsoleoutputcp

https://en.wikipedia.org/wiki/Code_page_437
https://en.wikipedia.org/wiki/Windows-1252
Or just use the Unicode code points: https://en.wikipedia.org/wiki/Code_page_437#Character_set
Registered users can post here. Sign in or register to post.