E
E
EGGOFFOX2020-11-20 21:18:32
C++ / C#
EGGOFFOX, 2020-11-20 21:18:32

Cyrillic in c++, how to work with wstring?

How to work with Russian letters in c++? output is empty. Is there a way to overwrite the L"" string?

#include <iostream>
#include <string>
using namespace std;

int main()
{
    wstring myStr;
    getline(wcin , myStr); 
    wcout << myStr[0] << endl; 
    return 0;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
none7, 2020-11-21
@none7

locale::global(locale(".866", locale::all));
It should work on VS19+Win10, where it almost certainly doesn't.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question