C++笔记2019-06-16

    Information hiding is conducive to program expansion and error detection, which separates the public interface of the class from the private implementation code. Accessing data through class member functions defined as inline functions will not reduce the efficiency of program execution due to the absence of function calls.

    A common mistake in programming is to use objects that have not been properly initialized beforehand.Define constructors in classes to initialize objects automatically.

    C++ supports the function overloading mechanism, which allows multiple functions to use the same name, with the limitation that their parameter tables must be different: different parameter types or different number of parameters.

    Add a wavy line to the class name to mark the destructor, which releases the resources acquired during the use or construction of class objects.

    Constructors and destructors are functions provided by programmers, and they do not construct or destroy class objects (compilers automatically apply them to class objects).

你可能感兴趣的:(C++笔记2019-06-16)