int x; while(input_stream >> x) my_vector.push_back(x); If a character that is not a number ( , or ; ) is encountered in the input stream input_stream , reading will stop. How can I continue reading integers after this? Am I doing the right thing?
for (int i = 0; i < blocks_number; ++i) { while (input_stream >> x) my_vector.push_back(x); input_stream.clear(); input_stream.sync(); input_stream.ignore(); }