#include "iostream.h"
#include"conio.h"
class employee
{
char name[30]; //string as class member
float age;
public:
void getdata(void);
void putdata(void);
};
void employee::getdata(void)
{
cout<<"Enter name:";
cin>>name;
cout<<"Enter age:";
cin>>age;
}
void employee::putdata(void)
{
cout<<"Name:"<
}
const int size=3;
int main()
{
employee manager[size];
clrscr();
for(int i=0;i
cout<<"\n Details of manager"< manager[i].getdata();
}
cout<<"\n";
for(i=0;i
cout<<"\n Manager"< manager[i].putdata();
}
getch();
return 0;
}
No comments:
Post a Comment