Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#include <iostream>
#include <vector>
int main ()
{
std::vector<int> first;
std::vector<int> second;
first.assign (7,100); // 7 ints with a value of 100
std::vector<int>::iterator it;
it=first.begin()+1;
second.assign (it,it);
std::cout << "Size of second: " << int (second.size()) << '\n';
return 0;
}
@devrandom

This comment has been minimized.

Copy link
Owner Author

devrandom commented Mar 10, 2014

Output is:

Size of second: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.