Home c++ does not work Local change

does not work Local change




setlocale (LC_ALL, "Russian"); – does not help.

Answer 1, Authority 100%

These questions were discussed many, many -..0 times.

Try to type in Google:

site: hashcode.ru C++ Windows Russian language krakoyar

and read, for example, here .

and @kovadim rights. It is not worth to learn Programming on C / C++ in Windows (and maybe there is no time to spend on it).

Answer 2, Authority 100%

system ("CHCP 1251");

It helps me, the easiest and most convenient option If you study.

setlocale (LC_ALL, "RUSSIAN"); – you can not use in this case.

The only one in the console will be unnecessary information of this kind: “Current code page: 1251”

Next, when you delve, there will be other solutions, more complex, universal.

Answer 3

Use functions:

setconsolecp (1251); // Setting the code page WIN-CP 1251 in the input stream
SetConsoleoutPutcp (1251); // Setting the code page WIN-CP 1251 in the output stream

More here

Previous articleBreaking Android Studio
Next articleSmooth scroll page

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions