How do I clear a string stream. I am tokenizing a file line by line, and the stringstream is global. I can tokenize the first line, but I can't get the second line working
stringstream currentLine;
while (!inputFile.eof())
{
currentLine << getlinefromfile(); //Gets the next Line
tokenizeLine(); //Tokenizes the line using the global stringstream peek() fnc
currentLine.str("");
currentLine.clear();
}
The above is my current attempt, but it doesnt work.