Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the learning points of C++

Shulou Source: shulou.com Published: 2022-06-02 09:27:02 10月26日 Update

This article introduces the relevant knowledge of "what are the learning points of C++". In the operation of practical cases, many people will encounter such a dilemma. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

16. Inline functions (inline) are actually similar to macros in implementation, expanding functions where inline functions appear to avoid function calls out of stack, such as stack, and improve efficiency. But the cost of inline functions is code growth. Inline functions are suitable for member functions and free functions. Functions implemented in a class are automatically inline functions. Inline must be defined on the implementation of the function, for example: inline int PlusOne (int) is invalid. The friend function is automatically changed into an inline function in the body of the class.

17. # include

# define DEBUG (X) cout

Tags: Functions variables statics names members compilers objects caches learning actual pointers spaces compilers caches essentials code global content points points more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS NVidia Xiaomi Shulou Technology Shulou Information