| | |
Comparing two STL maps..
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
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...
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 here to prove you wrong.
![]() |
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
| Thread Tools | Search this Thread |
api array based beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count data database delete deploy developer dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game getline givemetehcodez graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linker list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings struct temperature template text text-file tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






