still problem with UNICODE

hi, pls help me with unicode problem
here is my programm


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>
#include <wchar.h>
#include <windows.h>
#include <iostream>

#define _UNICODE

using namespace std;

void wmain()
{
   wchar_t sss[212];
   wcin >> sss;
   wcout << sss;
}


if i input: акмал
the output contain only: км
why it happens?
UNICODE (not _UNICODE) must be defined before including windows.h, and it only affects what parameters certain API calls take.
std::wcin and std::wcout are still at the mercy of the console (or rather, of the input and output streams), which may or may not be able to enter and display Unicode characters.

You don't need to include wchar.h in order to use wchar_t.
Last edited on
Topic archived. No new replies allowed.