i can use this class in another program
and it shows a errror
#include<dos.h>
class mydate
{
int d,m,y;
public:
friend void inputdate();
void displaydate(void);
};
void inputdate(mydate &t)
{
mydate t;
TOP:
cout<<"\n Enter date(dd-mm-yy)forms:";
cin>>t.d>>t.m>>t.y;
if(t.d<1||t.d>31)
{
cout<<"\n Wrong day entered";
goto TOP;
}
if(t.m<1||t.m>12)
{
cout<<"\nWrong month entered";
goto TOP;
}
if(t.y<1000||t.y>9999)
{
cout<<"\n Wrong year entered";
goto TOP;
}
}
What I have tried:
I dont knw where is my mistake