Edit: This doesn’t work if you are trying to write text that cannot be represented in your default locale. 🙁
Use std::wcout
instead of std::cout
.
wcout << ru << endl << en;
More Related Contents:
- Convert between string, u16string & u32string
- How do I read an entire file into a std::string in C++?
- std::string formatting like sprintf
- C++ convert string to hexadecimal and vice versa
- printf with std::string?
- Does std::string have a null terminator?
- C++ “cin” only reads the first word [duplicate]
- Read file-contents into a string in C++ [duplicate]
- C-Style Strings as template arguments? [duplicate]
- Is string::c_str() no longer null terminated in C++11?
- Convert float to string with precision & number of decimal digits specified?
- how does one securely clear std::string?
- Is it a good idea to return ” const char * ” from a function?
- Count character occurrences in a string in C++
- Splitting a string by a character
- C++ string to double conversion
- How to call a function by its name (std::string) in C++?
- Why is modifying a string through a retrieved pointer to its data not allowed?
- Similar String algorithm
- Custom manipulator for C++ iostream
- Why is there no support for concatenating std::string and std::string_view?
- What encoding does std::string.c_str() use?
- cannot convert ‘const char*’ to ‘LPCWSTR {aka const wchar_t*}’
- how to check string start in C++
- Padding stl strings in C++
- Align cout format as table’s columns
- How to compare strings
- How can a char pointer be initialized with a string (Array of characters) but an int pointer not with an array of integer? [duplicate]
- Forcing String to int Function to Consume Entire String
- How to get file extension from string in C++