0
I have two classes, each with its constructor. But when inheriting it stops compiling. What is the mistake?
10 ответов
0
this is how it is implemented (Así se implementa)
https://code.sololearn.com/c05M1howhY89/?ref=app
+ 2
How are you inheriting the classes ?
Are you taking into consideration the fact that as you are using parameterised constructors, the compiler will not create a default constructor for you so when creating a derived class object, it need to explicitly pass correct arguments to it's parent class's constructor ?
+ 1
Master Forts 🇦🇷 as mentioned before
The compiler is complaining about not being able to find Patient::Patient () because there isn't any constructor with such signatures in your entire program.
The closes one is "Paciente(string apellido, string nombres, string documento, string obraSocial )"for which you need to provide the arguments explicitly.
0
without inheritance both constructors work fine, the error is: no matching function for call Patient :: Patient (). The implement struct Query: public Patient {… ..}
Between struct and classes only privacy changes
0
only inheritance changes. The builders used to work fine. I don't see how to fix it
0
In C ++ struct and class are practically the same, with the only difference that in a struct the default members are public and in a default class they are private. A struct can contain the same as a class, methods, constructors, destructors, inheritance. There is a second difference between the use of struct and class and it is in the case of template: class can be used to declare types for a template, while struct cannot:
0
Can u told cooding app for Android please
0
in your playstore filter c ++
0
Debía poner explicit en los constructores