My questions are:
1) what exactly am I doing? (I think I´m seeing the code for ñ)
2) how can I use a string made of wide character (To output in spanish)?
Use wcout instead of cout when outputting wide characters. I thought that changing 'ñ' to L'ñ' would work but for me it just outputs a question mark. Maybe it works better for you.
@usandfriends, according to the tutorial, it´s just a matter of putting L"wide char string ñáüéíó!!!", i´m looking for the easy way, I guess there isn´t...
@Peter87, Code::Block does not compile it.
.cpp|6|error: converting to execution character set: Invalid argument|
||=== Build finished: 1 errors, 0 warnings ===|
But when I change wchar_t prueba = L'ñ'; to wchar_t prueba = 'ñ';, it does compile and outputs nothing visible. Yet if I change 'ñ' to any standard ASCII character, it works...
@Cubbi, I can´t make it run.
.cpp|8|error: converting to execution character set: Invalid argument|
.cpp||In function 'int main()':|
.cpp|6|error: 'stdout' was not declared in this scope|
.cpp|6|error: '_fileno' was not declared in this scope|
.cpp|6|error: '_O_U16TEXT' was not declared in this scope|
.cpp|6|error: 'setmode' was not declared in this scope|
||=== Build finished: 5 errors, 0 warnings ===|
Anyway, I thought it would be much easyer, just like placing L before the string. I couldn´t find any clear explanation on the web either, I´ll do some research tomorrow.