This is a classicalclassic example of std::back_inserter.
copy(istream_iterator<int>(lineStream), istream_iterator<int>(), back_inserter(numbers)); You can create the vector right from the start on, if you wish
vector<int> numbers((istream_iterator<int>(lineStream)), istream_iterator<int>()); Remember to put parentheses around the first argument. The compiler thinks it's a function declaration otherwise. If you use the vector for just getting iterators for the numbers, you can use the istream iterators directly:
istream_iterator<int> begin(lineStream), end; while(begin != end) cout << *begin++ << " ";