Jump to content
  • Advertisement
Sign in to follow this  
FGFS

nested multimap

This topic is 1828 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

Hi

 in a nested multimap the m_procedure_map shrinks depending the getSids function. Now how to avoid altering the m_procedure_map?

Many thanks

 

          for (multimap<string, ProcedureList>::iterator it2 = m_procedure_map.begin() ; it2 != m_procedure_map.end(); ++it2)
           {
               it2->second = SDatabase::getSids(msg);
               for (ProcedureList::iterator it3 = it2->second.begin(); it3 != it2->second.end(); ++it3)

...

 

 

Share this post


Link to post
Share on other sites
Advertisement

yes I need to replace it2->second but am short in ideas on how.

 

it's declared as:

typedef vector<Procedure*> ProcedureList;

Edited by FGFS

Share this post


Link to post
Share on other sites

From this tiny snippet of code, it does not look like the contents of your loop are affected by the multimap at all. Each iteration, it's just going to go through whatever getSids returns, which I hope does not change unless msg changes. You're messing up somehow, but unfortunately it doesn't seem like you're very capable of sharing the intent of your code, or formatting in a reasonable fashion, so I doubt you'll get much help.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!