What is the use of constructor where we can not create the object of abstract class?
Answers
Answered by
0
If we will create an object of the abstract class and calls the method having no body(as the method is pure virtual) it will give an error. That is why we cant create object of abstract class. Here is a similar StackOverflow question. In short, it is legal to have a public constructor on an abstract class.
Similar questions