I have a vector of strings that contain numbers, words, spaces, and even weird characters like quotation marks. I am trying to read it all in using a stringstream so I can separate the doubles from strings.
When I do this:
stringstream contains
4165 This package contains 12 1/2" Screws
Code:
stringstream >> mydouble
stringstream >> mystring
mydouble contains
4165
Then the only thing that gets read into mystring is
This package contains 12 1/2
How can I let it keep the entire line?
Sometimes my file contains this:
4165 This package contains 2 1/2" Screws
65 This package contains 12> 1/2" Screws
This package contains 1 screw
std::stringor a char array, the only thing in there should be "This".