Reputation: 87
the following gives me strange message: The message appears inside ifstream text, (when hovering it) path is a full windows style path, e.g.: "C:\t.txt"
void checkInput(string path)
{
ifstream text(path);
// "...<Error reading characters of string.>..."
if (text.is_open())
{
if (text.good())
...
the full message:
{_Filebuffer={_Set_eback=0xcccccccc <Error reading characters of string>.
_Set_egptr=0xcccccccc <Error reading characters of string>. ...} }
std::basic_ifstream<char,std::char_traits<char>> "
I tried to use char* instead string, and string.c_str. no good.
Thx for the answers, it seems the code running even though I still get this message. previously I had another error in my code.
I thought of deleting this, but it might help to know that this message doesn't prevent the code from run.
Upvotes: 1
Views: 4095
Reputation: 11
Upvotes: 1