Simple question, let's say I save a set with 5 values and I want to copy the first 3 values into a vector, is there a fast easy way to do that? I know that if I want to copy an entire set into a vector I can just use something like this:
set <int> test = {0,1,2,3,4,5};
vector<int> vect(test.begin(),test.end());
Can I do something similar to only copy the first n values? I've been using a for loop to do this but I was just curious to check if there was a faster way to code it.