So I have one problem and I put in the code for you to see. This is the code that i am having problems with:
int main (void){
FancyDateClass myDateObj(24, 2, 2008);
cout << "\n\n";
cout << "The date is ";
myDateObj.displayDate();
cout << "\n\n";
cout << "The month for ";
myDateObj.displayDate();
cout << " is ";
cout << myDateObj.getMonth();
cout << "\n\n";
cout << "The day of the week for ";
myDateObj.displayDate();
cout << " is ";
cout << myDateObj.getDayOfWeek();
cout << "\n\n";
cout << "This date ";
myDateObj.displayDate();
myDateObj.isLeapYear();
cout << "\n\n";
cout << myDateObj.subtract();
cout << "\n\nClosing down the program\n";
return 0;
}
int FancyDateClass::subtract(FancyDateClass &aDateObj){
aDateObj.setDate(25, 2, 2008);
day = (FancyDateClass::julianDate() - aDateObj.julianDate());
return day;
}
And here is the error that it is giving me:
1>c:\users\randy\documents\visual studio 2008\projects\cpetersonweek5lab05exercise1and2\cpetersonweek5lab05exercise1and2\inheritancecrp.cpp(62) : error C2660: 'FancyDateClass::subtract' : function does not take 0 arguments
The error it is refereeing to is on line 23 as you see in the snippet.
Now I know that I need something in the parenthesis to make it work, however I do not know what. I've tried several different options and they all come back with errors. I've searched and still not found any answers. If someone could just lead me in the right direction. If you need the full code let me know and I will post it.