1: A class containing a pure virtual function is called an abstract class, and an abstract class has at least one pure virtual function. An abstract class can only be derived as a new subclass of a base class, not in a program (that is, an object that cannot describe an abstract class), but with pointers to abstract classes. Not all code is written by the software Architect during program development, and sometimes it is necessary to call library functions and sometimes write to others. A software architect can establish an interface through a pure virtual function, and then let the programmer fill in the code to implement the interface, and is primarily responsible for creating abstract classes.
2: pure virtual function
A pure virtual function is a virtual member function that is marked as not specifically implemented, and it does not have function functions. In many cases, you cannot give a meaningful definition of a virtual function in a base class, and you can declare it as a pure virtual function in the base class, and the implementation is left to the derived class. Pure virtual functions cannot be called directly, but only provide an interface that is known to the derived class.
Declares a pure virtual function in the form of:
Introduction to C + + Classic-Example 8.9-abstract class, pure virtual function, creating pure virtual function