I have a file with the following pattern: 0.123,0.432,0.123,ABC
I've successfully retrieved the float numbers to an array, but I need now to find a way to get the last string. My code is the following:
vector<float> test;
for (float v = 0; test_ss >> v; ) {
test.push_back(v);
test_ss.ignore();
}
Tips:
- As the number of elements in each line is known its not a problem
- Also I don't particularly need to use this structure, I was just using it because it was the best I've found so far.
- All I want is in the end to have a vector with the float elements and a string with that last field.