8 errors in a Simple Class program, Please Locate errors. and elaborate, thanks

Feb 16, 2013 at 4:02pm
//Write a program to input date and print on the screen by using Class
#include <iostream.h>
#include <conio.h>
#include <stdlib.h>

class edate()
{
private:
int y, m, d;
public:
void gdate (void)
{
cout<<"Please Enter Year = ";
cin>>y;
cout<<"Please Enter Month = ";
cin>>m;
cout<<"Please Enter Date = ";
cin>>d;
}
void pdate (void)
{
cout<<"Date is :":
cout<<d <<" / "<<m<<" / "<<y;

}
};
main()
{
edate aniv;
aniv.gdate();
aniv.pdate();


getch();

}
Feb 16, 2013 at 4:10pm
The thing about error messages is they tell you what's wrong and what line the error is on.

So it really helps if you post the error messages as well.
Feb 16, 2013 at 4:15pm
#include <iostream>
#include <conio.h>
#include <stdlib.h>
using namespace std;
class edate
{
private:
int y, m, d;
public:
void gdate (void)
{
cout<<"Please Enter Year = ";
cin>>y;
cout<<"Please Enter Month = ";
cin>>m;
cout<<"Please Enter Date = ";
cin>>d;
}
void pdate (void)
{
cout<<"Date is :";
cout<<d <<" / "<<m<<" / "<<y;

}
};
main()
{
edate aniv;
aniv.gdate();
aniv.pdate();


getch();

}
Feb 17, 2013 at 6:21pm
Thanks.... Dear
Topic archived. No new replies allowed.