Sign in to follow this  

Merging two std::map objects

Recommended Posts

Supposing I have two std::map<X,Y> objects A and B. I want to create another one, C, which would contain all the elements contained in A and B, what is the simplest way to do this? Alternatively, is there a direct way to copy the elements from B into 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