vidavaluru sudheerreddy
Why can't we instantiate an abstract class?
By vidavaluru sudheerreddy in Windows Forms on Oct 26 2010
  • prakash gajera
    Oct, 2010 27

    A which has at least one pure virtual function is called abstract class. So as abstract class contains pure virtual function which will not have any implemetion so we cant create object of that class. Because if we allow to do so then what happen when user calls any pure virtual function within that class which has no implementation in that.

    • 1
  • Ravi Ranjan Kumar
    Nov, 2010 6

    We can't instantiate an abstract class because the motive of abstract class is to provide a common definition of base class that multiple derived classes can share.
    Abstract class is complete Virtual class which contain only abstract members which have noting to do by itself  so to avoid the situation we are restricted to instantiate abstract class but if its is need then create its subclass which allows you to create object or instantiate it.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS