How you implement the runtime polymorphism using c++? Give an Exmple
Ankur Mehta
class demo { public virtual void call() { cout<<"Hello demo"; } }class Demo2:Demo { public void call() { cout<<"hello Demo2"; } }void main() { clrscr(); Demo1 ob=new Demo1(); Demo1 ob1 =new Demo2(); ob.Call(); ob1.Call(); getch(); }O/P: hello demo hello demo2