Problems with ã and õ in C ++

0

I am having a difficulty with special characters in C ++. I watched some videos about printing special characters on the console, until then okay I can print everything except ã and õ. After several attempts I realized that the same accents do not appear in the cmd nor by associating them with values in the ASCI table or even simply by typing in the CMD. I use windows 8.1, I even tried translating it to pt-br but it still did not work.

In the code I've already added

and call the function

setlocate (LC_ALL, "Portuguese");

Only the console itself does not recognize. In the case only a and 6 do not recognize. All other accentuations (á, é, í, ó, ú, ê, î, ô, û, ç) function normally

The ã at prompt appears as | =

    
asked by anonymous 16.10.2015 / 23:16

1 answer

0

Boy, I do not know if it will work for you but I had similar problems, but mine was easy to solve, even using the setlocale did not print correctly, so later I discovered that in the sublime it is the text editor I use to program I had to save the text in Western (Windows 1252) rather than UTF-8 there when I compiled it gave everything right.

There's just to be, you're including the headers right?

#include <clocale> ou #include <locale.h> 
    
18.10.2015 / 02:57