Comment for readability, for others and yourself (you won't remember what you were thinking) ... Don't comment obvious ideas that your code already conveys. ...
Make it easy to write correct syntax the first time through the compiler ... Avoid the tendency to use code 'tricks' it will make the code less readable ...
Adding Templates and Exceptions to the Stack Example. Using the Stack ... set, map, multiset, multimap, hash_* Adapters: stack, queue, priority_queue. Strings: ...
A pointer can point to heap or stack memory or static (global) memory ... an object on the heap. The object will remain on the heap until the program says ...