- 2
Write a class Medical Staff that contains an attribute ID to store staff’s identity. The class contains member functions to inpu
Can someone please help me in this program???
3 odpowiedzi
+ 4
Where is your attempt?!
0
#include<iostream>
using namespace std;
class medical_staf {
int id;
char sname[20];
public:
void myFunction() {
cout << " Enter the staff id"<<endl ;
cin>>id;
cout<<"name of staff member"<<endl;
cin>>sname;
}
};
class doctor: public medical_staf {
private:
int num;
public:
fuc(){
cout<<"enter PDMC number"<<endl;
cin>>num;
}
};
class skin_spacialist: public doctor {
public:
fuc(){
cout<<" skin specialist "<<endl;
}
};
int main() {
skin_spacialist myObj;
myObj.myFunction();
myObj.fuc();
return 0;
}
0
How can I add file handling ostream I'n this