January 3rd, 2012, 06:42 PM
Yes, it's standard behavior, operator[] of std::map inserts elements if they don't exist, it's intentional:
http://www.cplusplus.com/reference/stl/map/operator%5B%5D/
If you merely want to check...
January 3rd, 2012, 11:55 AM
If you want to see topics in a course approach, I recommend taking a look at CS106B class at Stanford:
http://www.stanford.edu/class/cs106b/
What's nice is that they made their video lectures...
January 2nd, 2012, 03:58 PM
And, in general, RAII is preferred for resource(s) management in general and smart pointers for memory management in particular. I've already posted that as a reply, but apparently it got "moderated...
January 2nd, 2012, 03:56 PM
I've posted suggesting intrusive containers from Boost.Intrusive with links but apparently that got moderated. Let's try again, without helpful links, perhaps, that'll make the mods happy ;-)
January 2nd, 2012, 01:52 PM
Have you considered intrusive containers from Boost.Intrusive?
http://www.boost.org/doc/libs/release/doc/html/intrusive.html
In particular:...
January 1st, 2012, 02:22 PM
http://www.parashift.com/c%2B%2B-faq-lite/freestore-mgmt.html#faq-16.14
BTW, since you're coming of Java, it might be useful to know that in C++ (as opposed to C and, to some extent, Java or C#)...
December 20th, 2011, 03:49 PM
Qt is not that bad.
An alternative is WxWidgets.
If you're looking for something more lightweight, FLTK is the way to go.
The new way to have native GUI in Windows 8 is to use C++/CX:...