And I need only the number 20400. I have been trying to do this for the past hour but I can't come up with a solution. I have tried the following:
1 2 3 4 5 6
string data;
stringstream stream(test);
while (getline(test, data, "\n") {
cout << data << endl;
}
I thought this would print out the number and then the name, but I can't get it to compile. Am I using the string stream correctly? Is this even a decent way to approach this problem?