effective c++ reading notes

1. Think of C++ as a language federation

The initial name of c++ is c with class, haha, this is a bit similar to some goose factory jokes on Zhihu.

C++ has powerful functions and supports procedural programming, object-oriented, functional programming, generic programming, and metaprogramming forms. How should we understand it?

C language is the basis of C++

Secondly don't forget that c++ is an object oriented language

template c++, the power of generic programming of c++ is huge

STL library, which is an important part of c++

C++ efficient programming guidelines vary from case to case, depending on the usage part of C++

Passing by value in built-in types is generally more efficient than passing by reference, but when we come to object-oriented, passing by reference is often better due to the presence of constructors and destructors, especially when it comes to generic programming, but entering When iterators are used, you will find that both iterators and functions are modeled on top of the c pointer, and the pass-by-value rules apply again.

2. Try to use const, enum, inline instead of #define

…………Unfinished

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324836211&siteId=291194637