class Date
{
public : Date();
void getDate(int,string,int);
private : int day;
string mth;
int year;
};//end class
//getdate
void Date::getDate(int& inDay,string& inMth,int& inYear) const //error here
{
inDay=day;
inMth = mth;
inYear=year;
}
I'm doing up a date class. Am doing a class function getDate to return back the day,mth and year through a reference variable. I am getting a compilation error and have been staring at my codes for a while. Can't seem to find where went wrong.
Could someone give me a help here please?
error message was, "void Date::getDate(int&, std::string&, int&) const' does not match any in class `Date' " and void Date::getDate(int, std::string, int)
Many thanks.