What is the real need of taking reference variable of base class in dynamic method dispatch
https://pastebin.com/W3DQvsfg
the code here implements Dynamic method dispatch but my question is instead of taking base class reference as A r; can we just create object of respective class and call the function? like just do: ```
a.m1();
b.m1();
c.m1();
so what is significance of ``` A r;```???
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.