0

I need to read one wide Charecter(wchar_t) from a file once but it says:
"ambiguous overload for 'operator>>' in 'WER >> mont'

The part that also confuses me is that it writes the Charecter just fine.

It is only one Charecter not a string if that makes a difference.
Thanks.

2
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by Zssffssz
0

Really simple:

wchar_t qwer;
ifstream asdf ("DATA.dat");
asdf>>qwer;
asdf.close();

I know that there is only one wide Charecter in data.dat.

0

Why are you using ifstream instead of wifstream? If you're working with wide characters, it's generally a good idea to use wide character oriented classes.

0

I thought that only applied to cin and cout (as wcin and wcout). Does normal stuff go though these wide vareants nomaly, There's going to be two other lines of non wideness in the file (it a savegame thing)?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.