Virtual Functions
Class member functions declared using the virtual keyword. It can be implemented at the time of declaration or outside the class declaration.
Class C1 {<br/> virtual void a (); <br/> virtual int B () {}< br/> };
Pure virtual functions
Declare using the virtual keyword and class member functions with = 0 after the prototype declaration. Function implementation is not allowed in the function prototype. However, in the function external body, pure virtual functions can be implemented.
Classes containing pure virtual functions are called abstract classes. All member functions are pure virtual functions.
Class C2 {<br/> virtual void a () = 0; <br/>}; <br/> void C2: (){}
If the subclass that inherits abstract classes does not implement pure virtual functions, this subclass is also an abstract class. An abstract class cannot declare an instance.