Hi,
I'm just trying to print the contents of a notepad file I saved with
unicode encoding on my win xp machine. I keep getting strange
characters printed out though. Why doesn't this work?
std::wifstream wifile("C:\\unicode.txt");
if (wifile.is_open()) {
wchar_t wszBuffer[MAX_PATH];
while (wifile.getline(wszBuffer, MAX_PATH)) {
AfxMessageBox(wszBuffer);
}
}
My unicode saved file just has the contents "hello" in it, but my
message box prints some crazy stuff.
Thanks