1. Virtual functions and pure virtual functions can be defined in the same class (class), classes containing pure virtual functions are called abstract classes (abstract class), and classes that contain only virtual functions cannot be called abstract classes.
2. A virtual function can be used directly, or it can be invoked in polymorphic form after a quilt class (sub Class) overload, whereas a pure virtual function must be implemented in a subclass (sub Class) to be used, because pure virtual functions are in the base class (base classes)
Only declarations are not defined.
3. Both virtual functions and pure virtual functions can be overloaded in subclasses (sub Class) and invoked in polymorphic form.
4. Virtual functions and pure virtual functions often exist in abstract base classes (abstract base class-abc), inherited subclass overloads, to provide a unified interface.
5. Definition form of virtual function: virtual {method Body}
The definition form of pure virtual function: virtual {} = 0;
There cannot be a static identifier in the definition of a virtual function and a pure virtual function, for the simple reason that a function that is modified by static requires bind at compile time, whereas a virtual function is dynamically bound (run-time bind) and is decorated with a function lifecycle (life Recycle) is not the same.
6. If a class contains a pure virtual function, any statement that attempts to instantiate the class will cause the error to occur because the abstract base class (ABC) cannot be invoked directly. A method that calls its subclasses after a quilt class inherits the overload.