|
-
February 8th, 2012, 07:50 AM
#9
Re: How to check the result returned from an iterator
Code:
stdext::hash_map<std::string, CObjects*> m_SparseMap;
Just a mention that putting pointers to objects inside STL containers is not generally a good idea, precisely because you run into problems like uninitialized objects, memory leaks, double free etc. The only (defendable) use for it is when you somehow really need to use inheritance on the objects.
Get this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
Supports C++ and VB out of the box, but can be configured for other languages.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|