How I can print the wchar_t values to console?

Posted by zed91 on Stack Overflow See other posts from Stack Overflow or by zed91
Published on 2010-03-22T16:08:02Z Indexed on 2010/03/22 16:11 UTC
Read the original article Hit count: 261

Filed under:
|
|
|

Example:

#include <iostream>

using namespace std;

int main()
{
    wchar_t en[] = L"Hello";
    wchar_t ru[] = L"??????"; //Russian language
    cout << ru
         << endl
         << en;
    return 0;
}

This code only prints HEX-values like adress. How to print the wchar_t string?

© Stack Overflow or respective owner

Related posts about wchar-t

Related posts about c++