I have a text file with numbers and words, and I want to read only the numbers (double)and place then into a vector.
How can I do this?
So far I have
Code:double x; while (input >> x) // put input from file into vector { if (!(input >> x)) { cout << "error - word" << endl; } else input_vec.push_back (x); }