Reading getline from cin into a stringstream (C++)
So I'm trying to read input like this from the standard input (using cin ): Adam English 85 Charlie Math 76 Erica History 82 Richard Science 90 My goal is to eventually store each data piece in its own cell in a data structure I have created, so basically I want to parse the input so each piece of data is individual. Since each row of input is inputted by the user one at a time, each time I get an entire row of input that I need to parse. Currently I am trying something like this: stringstream ss; getline(cin, ss); string name; string course; string grade; ss >> name >> course >> grade; The