Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Mike38722

STL multimap

This topic is 6060 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I can't get multimap to work. Here is a minimal example: #include<vector.h> #include<multimap.h> multimap<vector<char>, vector<char> > dict; vector<char> key; //some lines that put stuff in key vector<char> data; //some lines that put stuff in data dict.insert(pair<vector<char>, vector<char> >(key, data)); The last line produces an entire screen worth of errors (which all disappear when I comment that line out). If anyone can help me, it would be greatly appreciated. Edited because HTML messed-up all my less-than and greater-than signs Edited by - Mike38722 on December 11, 2001 7:55:21 PM

Share this post


Link to post
Share on other sites
Advertisement
There is no comparison operator between vectors, even vectors. Therefore, the multimap cannot order your keys. If you want to store strings... store std::strings.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!