•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 401,691 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,778 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Views: 2121 | Replies: 7
![]() |
Is there a (builtin) way to compare the contents of two stl maps? (Assuming of course that the maps have the same data types).
I thought of writing this myself, but iterating through each map and seeing if the contents are found in the other map (and then doing the reverse), but was wondering if this exists already...
I thought of writing this myself, but iterating through each map and seeing if the contents are found in the other map (and then doing the reverse), but was wondering if this exists already...
>Is there a (builtin) way to compare the contents of two stl maps?
Have you tried the relational operators? Or did you just come running here before attempting anything so that you could waste time waiting for an answer?
Have you tried the relational operators? Or did you just come running here before attempting anything so that you could waste time waiting for an answer?
I'm a programmer. My attitude starts with arrogance, holds steady at condescension, and ends with hostility. Get used to it.
You want the symmetric difference of the two maps. Conveniently enough, the standard library provides you with the set_symmetric_difference template function in <algorithm>.
I'm a programmer. My attitude starts with arrogance, holds steady at condescension, and ends with hostility. Get used to it.
![]() |
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Fast data storage (C++)
- Array limit (C)
Other Threads in the C++ Forum
- Previous Thread: Microsoft visual studio.net 2003 edition
- Next Thread: seg fault with head pointer



Linear Mode