Answer the question
In order to leave comments, you need to log in
Why doesn't the compiler skip Unicode?
Hello! For undertakings in WINAPI, it was necessary to study Unicode, its types and code writing:
#include <Windows.h>
#include <iostream>
using namespace std;
int main(void) {
CHAR * c = "ANSI STRING";
WCHAR * wc = L"Строка юникода";
cout << wc << endl;
cin.get();
}
main.cpp:7:15: error: converting to execution character set: Illegal byte sequence
WCHAR * wc = L"Строка юникода";
Answer the question
In order to leave comments, you need to log in
In the project settings on the GENERAL tab there is a CHARACTER SET parameter that indicates in what encoding the program will be compiled:
What do you have there?
char, wchar_t instead of WCHAR.
std::wcout to output unicode characters.
And it may be necessary to change the locale of the console, but it's better to google it, I'll write it wrong from memory.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question