Skip to content

Instantly share code, notes, and snippets.

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;
second.assign (it,it);
std::cout << "Size of second: " << int (second.size()) << '\n';
return 0;

This comment has been minimized.

Copy link
Owner Author

@devrandom 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