T
thomas
hi guys,
I got a question about istream_iterator.
---code---
istream_iterator<int> input(cin), end;
vector<int> vec;
copy(input, end, inserter(vec, vec.begin()));
---code---
the problem is that I don't want to copy all the data from input to
vector.
I want to copy only "n" int values from input. Can I do that with
istream_iterator?
I got a question about istream_iterator.
---code---
istream_iterator<int> input(cin), end;
vector<int> vec;
copy(input, end, inserter(vec, vec.begin()));
---code---
the problem is that I don't want to copy all the data from input to
vector.
I want to copy only "n" int values from input. Can I do that with
istream_iterator?