Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
copy_30-Seconds-of-C++
//g++ 5.4.0 #include<iostream> #include<vector> #include<algorithm> int main() { std::vector<int> origin {1, 2, 3}; std::vector<int> destination; std::copy(origin.begin(), origin.end(), std::back_inserter(destination)); // destination is now {1, 2, 3} for (auto value : destination) { std::cout << value << " "; } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
scope new delete
23 2.5
Dec to Bin
constructing object on first use as return value of (pointer to) object-returning function
Triplet sum in array
decode
1234
python
kadane's algorithm 2
pointer array of functions
stackse - search stackoverflow differently
Please log in to post a comment.