#include <iostream>
#include <queue>
using namespace std;
struct patient {
string name;
int age;
bool is_male;
};
patient make_p() {
// todo impl...
return patient();
}
void menu() {
cout << " Menu" << endl;
cout << "1) Add patient" << endl;
cout << "2) Show" << endl;
}
queue<patient> list;
void addPatient(patient p) {
list.push(p);
}
void show() {
for (auto p : list) {
cout << "===" << endl;
cout << "nmae: " << p.name << endl;
cout << "age: " << p.age << endl;
cout << "is mail: " << p.is_male << endl;
}
}
int main()
{
bool running = true;
while (running) {
menu();
int choice; cin >> choice;
switch (choice) {
case 1:
addPatient(make_p());
cout << "Successfully added a new patent" << endl;
case 2:
show();
case 3:
running = false;
cout << "Terminated!" << endl;
break;
default:
cout << "Invalid choice!" << endl;
break;
}
}
}
Comments
Leave a comment