0
In C++, how to call derived class constructors if base class also has parameterized constructor?
I have a simple base class in my program. Its constructor takes parameters. I have a derived class that also has its own parameters in its constructor. Why does it return an error if i create an instance of the derived class? Do i first need to pass parameters to the base class then derived class?
2 odpowiedzi
+ 1
Define a default constructor (i.e ...no params) in your base class.