Created
March 10, 2014 21:52
-
-
Save devrandom/9475243 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output is:
Size of second: 0