0Guideabbreviation: constructor ctor destructor Dtor1Make yourself accustomed to C + +C+ + times Language: C, object_oriented C + +, Template C + +, STL with const,enum, inline replace#define ConstThe member function commits to never change the logical state of its object,Constmember function call non-Const is the wrong behavior2Construction/Destruction/assignment Operation copy constructor/copy assignment just put every non-static member variables are copied to the target object any class as long as the virtual function is almost certain that there should be a virtual destructorstring, Vector,list,Set, unordered_map without virtual destructor3Resource Management RAII (Resource acquisition is initialization) The timing of the resource acquisition is the time to initialize Std:auto_ptr<Investment>PINV (Createinvestment ()) RCSP (Reference-counting smart pointer) Reference counting wisdom pointer shared_ptr<t>.4Design and declaration Cross-DLL Problem: object is created by new in the dynamic-link library (DLL), but is destroyed in another DLL by delete. Built-in type, iterator, function object: pass by value; Other: pass by reference toConst5implement references, pointers and iterators are handles (used to get an object)
"Effective C + +" Reading notes