Rewrite the following program after removing the syntactical error(s) if any. Underline each correction.
#include<iostream.h>
#include<conio.h>
class employee
{ int no;
class data
{ int dd,mm,yy;
public:
void print_data()
{ cout<<dd<<mm<<yy; }
};
data dob;
public:
data doj;
void prin_t()
{ doj.print_data();
cout<<dob.dd<<dob.mm<<dob.yy; }
};
void main()
{ employee 1emp;
data 2emp; }
I am studying in +2.
I think the errors are in main function, 1emp is wrong and cannot call data as it is a private function. are there any more corrections?