Skip to main content
GameDev.net gamedev.net
🔒 Locked

Inserting into a multiset

Started by wizard341 Jul 18, 2003 at 6:41 PM 0 replies 200+ views
Original Post
wizard341
wizard341
I came across a wierd error recently, and i cant for the likes of me figure out why its happening. My problem is this: particle_t tempParticle = p_Particle; particleContainerManager[listToInsert].insert(tempParticle); So particle_t is just a structure. particleContainerManager is defined as this (not sure if it matters but wouldnt hurt to tell)
std::vector<std::multiset<particle_t,comparingFunctor> > particleContainerManager;
So when i do the first statement, it copies over the particle fine. But when i try to insert the particle, the list inserts *something* but not what i *actually* want. I stepped through it with the debugger and it seems to just spit out garbage. So not only do i want to fix this problem, but i am interested in finding out why this is happening.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.