|
| Alex B (20) | |||
| I am trying to learn how to use the Windows API, and I keep running into road blocks. Here is the simple code I am using:
It works in Dev-C++. In Visual C++ 2008 Express Edition, it compiles successfully, but when I run it it displays weird Japanese-looking stuff instead of English text. I like working with Visual C++ better, which is why I want to fix this. I am getting annoyed though at all the problems I'm encountering. Does anyone know how to fix this? Thank you. | |||
Last edited on | |||
| Jeff HS (71) | |||
try:
the L is outside the string. if it doesnt work check the your language options and Unicode character set in the project properties. Jeff | |||
| Alex B (20) | |
| Thanks, Jeff. It works now. | |
| Alex B (20) | |
| I read a description of what the L does, but I don't really understand... isn't it just making the code less portable between compilers? | |
| Jeff HS (71) | |||
| Hmm, for windows. the answer is no. With the L you are telling the compiler that it is a wide character string. C++ uses 8 bit unicode char, while windows uses 16 bit unicode. But yeah you could just change the project properties like i said on my first post. change the charatcer set to Use Multi-Byte Character Set. May not be the your case but some people fail to understand that:
Both has its own standards Detailed info can be found on this article by Jason Orendorff: http://www.jorendorff.com/articles/unicode/windows.html and of course the msdn: http://msdn.microsoft.com/ | |||
This topic is archived - New replies not allowed.
