2
Reply

Why can't we instantiate an abstract class?

vidavaluru sudheerreddy

vidavaluru sudheerreddy

Oct 26, 2010
12.4k
0

    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.

    Ravi Ranjan Kumar
    November 06, 2010
    0

    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.

    prakash gajera
    October 27, 2010
    0