C++ abstract class is a class designed for the role of the base class having at least one pure virtual function. A class without a pure virtual function cannot be termed as an abstract base class in C++. Abstract classes are used as a framework upon which new subclasses are derived.
A Program based on 'Abstract Class & Pure Virtual Function' :-
virtual void disp()=0;
class A:public base
Pure Virtual Functions and Abstract Classes in C++
Sometimes implementation of all function cannot be provided in a base class because we don’t know the implementation. Such a class is called abstract class. For example, let Shape be a base class. We cannot provide implementation of function draw() in Shape, but we know every derived class must have implementation of draw(). Similarly an Animal class doesn’t have implementation of move() (assuming that all animals move), but all animals must know how to move. We cannot create objects of abstract classes.
A pure virtual function (or abstract function) in C++ is a virtual function for which we don’t have implementation, we only declare it. A pure virtual function is declared by assigning 0 in declaration.