herez some errors please help me in removing these errors...

#include <iostream>
#include <conio.h>

using namespace std;

class Date
{
private:
int Day,month,year;
public:
void display();
void setDay();
void setmonth();
void setyear();
int getDay();
int getmonth();
int getyear();
};
Date();
Date(int,int,int);

Date::Date()
{
int Day=1;
int month=1;
int year=1947;
}
Date::Date(int theday,int themonth,int theyear=2002)
{
Day=theday;
month=themonth;
year=theyear;
}
void Date::display()
{
cout<<"The Day is"<<getDay()<<"-"<<getmonth()<<"-"<<getyear()<<endl;
}
void Date::setDay(int i)
{Day=i;}
void Date::setmonth(int i)
{month=i;}
void Date::setyear(int i)
{year=i;}
int Date::getDay()
{return Day;}
int Date::getmonth()
{return month;}
int Date::year()
{return year;}


int main()
{ Date Date1,Date2(1,1,2002),Date3(20,30);
Date1.display();
Date2.display();
Date3.display();
}
anyone.... reply fast.........
what kind of errors do you get?

Wait:
1
2
int Date::year()
{return year;}
is an error
needs to be
1
2
int Date::getyear()
{return year;}
is an error
Last edited on
Topic archived. No new replies allowed.