how to read all numbers from a file to std::vector?
I have tried this one:
but if there (in the file) is not end of file right after the last number, then the while loop will pass one more time and put one "extra" number to my vector -> which is bad.Code:
in >> number;
Does anybody know a solution to this problem?