Cyrillic in c ++, how to work with wstring?
-
How to work with Russian letters in c ++? the output is empty. Is there a way to rewrite a string in L ""?
#include <iostream> #include <string> using namespace std; int main() { wstring myStr; getline(wcin , myStr); wcout << myStr[0] << endl; return 0; }
C++ Anonymous, Mar 2, 2020 -
setlocale (LC_ALL, “ru”); - insert at the beginning of main.Matthew Best
-
locale :: global (locale (". 866", locale :: all));
It should work on VS19 + Win10, almost certainly not somewhere else.Isabelle Griffith
2 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!