Last active
June 19, 2016 05:52
-
-
Save 1995hnagamin/7908a78eeb460fbfb91aad57b59eb6ac 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> | |
#include<algorithm> | |
#include<iterator> | |
int main() { | |
std::vector<int> v = {0,1,2,3,4}; | |
std::vector<int> w; | |
std::copy(v.begin() + 1, v.begin() + 4, std::back_inserter(w)); | |
for (int n : w) { | |
std::cout << n << std::endl; | |
} | |
/* | |
1 | |
2 | |
3 | |
*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment