Preface
Study the book "Effective C++" 55 specific methods to improve program and design" and simple notes.
content
1. Get yourself used to C++
- Item 01: Treat C++ as a language federation
C++ is a multi-generic programming language, a language that supports procedural, object-oriented, functional, generic, and meta-programming at the same time. - Item 02: Try to replace
#define with const, enum, and inline instead of a compiler instead of a preprocessor.
The practicality of "enum hack".
Suggestion:
For simple constants, it is best to replace #define with const objects or enums.
For macros that resemble functions, it is best to use inline functions instead of #define. - Item 03: Use const as much as possible.
For a detailed description of the const keyword, see the portal . - Item 04: Make sure that the object has been initialized before being used (some of the details are not understood)
2. Construction/destruction/assignment operations
3. Resource Management
4. Design and declaration
5. Realize
6. Inheritance and object-oriented design
7. Templates and generic programming
8. Customize new and delete
9. Miscellaneous discussions
postscript
Continually updated!