Re: help with STL needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Martin,

The key in your set is the POINTER, not the object. The pointer is different between obj1 and obj3, so they are different objects.

Use a std::map, not a std::set. For the key in your std::map, use the public key of the object you are sticking in the std::map.

Or make your classes monostate or singleton. But that's not really what you'd want, I'd think.

--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux