I recently started the console game "Fool", and faced such a problem when displaying card suits that for example instead of diamonds or the rest, it displays "?".

Please help, who knows how to display different characters in the console?

PS I read something about Unicode, but I still didn’t understand anything, except that you can do it for sure.

PS Or maybe there is for c ++ as on Arduino, in order to draw some sort of symbol for output?

  • 3
    Possible duplicate question: Displaying different characters in the console - LFC
  • 2
    Not understood. Why do you need a second question? You already asked this, and they showed you how. - HolyBlackCat
  • @HolyBlackCat no one showed me how all the answers do not lead to anything anyway "?" - user262343
  • So you could answer our comments on the question and say so. For example, that method works for me. - HolyBlackCat
  • one
    Do not constantly ask the same question repeatedly. Minus for the creation of garbage duplicates of the issue. - AK

1 answer 1

Perhaps the problem is localization. Without code it is difficult to say. I would venture to suggest that you have the following localization string in the code: setlocale(LC_ALL,"Rus"); , it should be replaced with:

 SetConsoleCP(1251); SetConsoleOutputCP(1251); 

Need to change shirft. Click the right mouse button on the console header, select properties-> font, and there you will find select Lucida Console font. And most importantly do not forget to add the following library: #include "windows.h"

  • and how it helps to output different characters to the console - user262343