J
Jeremy Bishop
Hi,
When I open a file for the second time (sequentially) i get the error
error: junk after document element
tA one-time opening and use of the file works fine, it's the second time
where something goes wrong. The code basically looks like this:
ifstream in(path.c_str());
assert(in);
string line;
while (getline(in, line))
{
// do stuff
};
// in.clear();
// in.close();
I have used in.clear() and closed() with no success... If i call the loading
routine the second time, i get the error. Does anyone have any ideas what
the trouble might be?
When I open a file for the second time (sequentially) i get the error
error: junk after document element
tA one-time opening and use of the file works fine, it's the second time
where something goes wrong. The code basically looks like this:
ifstream in(path.c_str());
assert(in);
string line;
while (getline(in, line))
{
// do stuff
};
// in.clear();
// in.close();
I have used in.clear() and closed() with no success... If i call the loading
routine the second time, i get the error. Does anyone have any ideas what
the trouble might be?