Sign in to follow this  

Appending a vector to another vector

Recommended Posts

If I have two std::vector<int>, a and b, is there a good way to copy the elements of b into a, so that a would contain elements of a + elements of b? Another way than just looping through b, and push_back elements to a?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this