cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
windows 10 code blocks problem
windows 10 code blocks problem
Oct 25, 2017 at 11:31am UTC
Raul4pk
(31)
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
Oct 25, 2017 at 12:00pm UTC
Repeater
(3046)
There is no smiley face in the ASCII character set.
https://en.wikipedia.org/wiki/ASCII#Character_set
Oct 25, 2017 at 12:27pm UTC
Chervil
(7320)
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
Oct 25, 2017 at 1:17pm UTC
helios
(17562)
Or just use the Unicode code points:
https://en.wikipedia.org/wiki/Code_page_437#Character_set
Topic archived. No new replies allowed.