Write a class Medical Staff that contains an attribute ID to store staff’s identity. The class contains member functions to inpu | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 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???

23rd Jun 2021, 8:18 AM
sana riaz
3 Answers
+ 4
Where is your attempt?!
23rd Jun 2021, 8:40 AM
Dino Wun (Use the search bar plz!)
Dino Wun (Use the search bar plz!) - avatar
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; }
23rd Jun 2021, 8:56 AM
sana riaz
0
How can I add file handling ostream I'n this
23rd Jun 2021, 8:57 AM
sana riaz