So what I want to do is
initialize my subclass's constructor with my base class's constructor.
this is what my base class constructor looks like.
Appointment::Appointment(string description, int month, int day, int year, int hour, int minute):date(month, day, year){
this-> hour = hour;
this-> minute =minute;
this-> description = description;
}
this is what my subclass constructor looks like
Daily::Daily(string description, int month, int day, int year, int hour, int minute) : Appointment(description, month, day, year, hour, minute){
}
^in my subclass's constructor (daily) there is an error that states that I need to explicitly initialize the member 'date', which does not have a default constructor.
How do I explicitly initialize both 'date' and 'Appointment' in my subclass constructor's initializer list?
Does it look something like this?
Daily::Daily(string description, int month, int day, int year, int hour, int minute) : Appointment(description, month, day, year, hour, minute):Date(month, day, year)
Thanks