This question has already been answered:

I used the wchar_t type and the wcout method to display the Unicode Cyrillic characters, but they are simply not output. What needs to be done to output them to the console?

Reported as a duplicate member by VladD c ++ 1 May '16 at 10:44 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • cout << "текст"; wcout<< L"текст"; either: char* text = "some text"; TCHAR* Utext =L"пример текста" ; - LighFusion
  • screw console? - KoVadim

1 answer 1

For example:

 #include <locale> int main() { wcout.imbue(locale("rus_rus.866")); wcin.imbue(locale("rus_rus.866")); wstring name; wcout << L"Введите ваше имя: " << endl; wcin >> name; wcout << L"Привет " << name << L"!" << endl; return 0; }