How to create a fast vector from sequential values
For instance:.
vector<int> vec (4, 100); for (vector<int>::iterator it = vec.begin(); it != vec.end(); ++it) { cout << *it << endl; }
Of:
# 100
I want to
vector<int> vec (100, "0 to N");
I want to know the most effective way to achieve this result. For example, without using a loop.
N is a run-time variable.
source share