Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
Initializing a map...
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Jeff Schwab, post: 3450605"] Augh! std::map is a concrete type, really not meant to be publicly subclassed. It hasn't got a virtual destructor, for example, so the following causes undefined behavior: std::map* p = new myMap; delete p; Your idea is good, but either (1) the inheritance should be private, or (2) myMap should contain the std::map sub-object as a member rather than a base. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
Initializing a map...
Top