-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
47 lines (42 loc) · 1.17 KB
/
main.cpp
File metadata and controls
47 lines (42 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include <iostream>
#include"health.h"
#include<string>
using namespace std;
int main()
{
Login login;
login.readUsernamesPasswords();
int choice=0;
cout << "---------------------------" << endl;
cout << "| BABY HEALTH CARE |" << endl;
cout << "---------------------------" << endl;
cout << "1. Login" << endl;
cout << "2. Create Account" << endl;
cout << "3. Change Password" << endl;
cout<<"4. Exit"<<endl;
while(choice!=4)
{
cout <<"\n\n"<< "Enter your choice: ";
cin >> choice;
switch (choice) {
case 1:
login.login();
exit(0);
break;
case 2:
login.createAccount();
login.saveUsernamesPasswords();
break;
case 3:
login.changePassword();
break;
case 4:
cout<<"You exited the program\n";
login.saveUsernamesPasswords();
break;
default:
cout << "Invalid choice" << endl;
}
}
return 0;
}