If I use the uncommented 3 lines for getting an int out of a stringstream, the value in MPV is wrong. However, if I make a new stringstream, then it works fine. I thought setting .str("") was essentially resetting the stringstream?
line = "";
getline(fin, line); //get fourth line
//these lines don't work
LineStream.str("");
LineStream << line;
LineStream >> MPV;
/*
//these lines do
stringstream LineStream2;
LineStream2 << line;
LineStream2 >> MPV;
*/
Thanks,
Dave