I'm receiving a common error with one of my classes, that of no default constructing being located for a specific class
Heres the class in question and its constructor
class Campaign {
public:
double funding;
double managerEffectiveness;
Date Day; //determine when they cant spend money anymore
Campaign(double funding, double managerEffectiveness, Date Day) {
funding = funding;
managerEffectiveness = managerEffectiveness;
Day = Day;
}
};
The error is occurring at line 8, specifically Date Day. This variable of type Date can be used in a similar way in other constructors successfully, for example here is another class that utilizes the Date class. The exact error is no default constructor exists for class "Date"
class electrorateSupport: public Electrorates{
public:
Date Day;
double funding;
double financialEffectiveness();
double fudningImpact();
electrorateSupport(Date Day, double funding,double stanceDistriubtion, int Cluster)
:Electrorates(stanceDistriubtion,Cluster), Day(Day), funding(funding) {
Day = Day;
funding = funding;
}
);
This class is similar to the Campaign class, with the only big difference being it is a child class that inherits from another. I've been comparing these two classes to find any other differences which may cause my error but I can not be able to pinpoint any. I have also attempted to rewrite the class multiple times, still resulting in no definite issue. Thank you for any help!
EDIT date class has been provided
class Date {
public:
int Day;
int Month;
int Year;
Date(int day, int month, int year) {
this->Day = day;
this->Month = month;
this->Year = year;
}
void setDay(int day)
{
Day = day;
}
void setMonth(int month)
{
Month = month;
}
void setYear(int year)
{
Year = year;
}
int getDay()
{
return Day;
}
int getMonth()
{
return Month;
}
int getYear()
{
return Year;
}
};