P
Pranav
Hello All,
I have a simple question regarding the definition of abstract class,
IIRC , Abstract class is one which contains virtual function
declaration and other variables and no object of this class is created
directly.
If this is the case why don't we hide the constructor of abstract
class into protected region? So that only object which inherits it can
call the ctor of abstract class. In this way no one can create the
object of abstract class independently.
Correct Me If I am wrong some where,
Thank You,
Pranav
I have a simple question regarding the definition of abstract class,
IIRC , Abstract class is one which contains virtual function
declaration and other variables and no object of this class is created
directly.
If this is the case why don't we hide the constructor of abstract
class into protected region? So that only object which inherits it can
call the ctor of abstract class. In this way no one can create the
object of abstract class independently.
Correct Me If I am wrong some where,
Thank You,
Pranav