Pure Virtual Method
C++ pure virtual Method also known as pure virtual function is same as that of virtual method. The only difference here in Pure virtual function is we need not to write any function definition, only we have to declare it. Pure virtual method don't have a body, it will have = 0 in the end.
Before entering coding part, we need to be clear with Virtual Method Concept where we clearly studied a concept called Method Overriding. In Pure virtual method also same method overriding takes place.
CODE
EG 1 . Creating an abstract class called Shape with 3 Pure virtual methods and inheriting it to a child class called Rectangle.
#include <iostream>
using namespace std;
class Shape {
  public:
    virtual double Area() = 0;
    virtual double Perimeter() = 0;
    virtual double Volume() = 0;
};
class Rectangle : public Shape {
  public:
    double length, width, height;
    double Area() {
        return length * width;
    }
    double Perimeter() {
        return 2 * (length+width);
    }
    double Volume() {
        return Area() * height;
    }
};
int main() {
    //UPCASTING
    Shape* s1 = new Rectangle();
}
(Click Here, For more exercises)