C++ spanish question mark

后端 未结 6 1552
梦谈多话
梦谈多话 2021-01-16 18:12

I am beginning developing in C++ and I am developing a simple calculator in console and when my program ask to the user if wants to exit,the character \'¿\' doesn\'t appear

6条回答
  •  星月不相逢
    2021-01-16 18:31

    Assuming you are using simple call to std::cout, you should be able to print Unicode strings, if you set your command line to Unicode mode:

    1. Change code page to UTF-8

    You can do this by simply calling the command below in your cmd:

    chcp 65001
    

    2. Make sure you are using a font which has the characters you want to display

    Lucidia Console should do the trick, as it supports ¿ (and other characters included in WGL4).

提交回复
热议问题