am doing my project phase 1 its about hospital :
i have made a person class--patient inherite from it
i wanna afunction to----add,alter,delete
patient---------------- in text file
the output
1--> add patient
2-->alter patient data
3-->delete a patient
class person{
int id;
string fname;
string lname;
string gender;
int age;
int phone;
public:
bool get_id(int);
bool get_fname(string);
bool get_lname(string);
bool get_gender(string);
bool get_age(int);
bool get_phone(int);
string set_fname();
string set_lname();
string set_gender();
int set_age();
int set_phone();
int set_id();
};
pro.soltan
0
Newbie Poster
Recommended Answers
Jump to PostDo you know how to do file I/O? If not then you need to read a tutorial or your textbook about it. To alter or delete a patient from the text file, the text file has to be completly re-written, there is no way to modify or remove strings from …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.