Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- string GetInput()
- {
- string s = "";
- cout << ">> ";
- getline(cin, s);
- return s;
- }
- void mainMenu() {
- cout << "Select an option" << endl;
- cout << "1. Add Entry" << endl;
- cout << "2. Edit Entry" << endl;
- cout << "Q. Quit" << endl;
- string input = GetInput();
- while (!(input.find_first_not_of("12qQ") == string::npos) || input.empty())
- {
- input = GetInput();
- }
- if (input == "1") {
- cout << "Add Entry" << endl;
- //AddEntry();
- }
- else if (input == "2") {
- cout << "Edit Entry" << endl;
- }
- else {
- cout << "Quit" << endl;
- }
- }
- int main() {
- cout << "===================================================" << endl;
- cout << "| Secure Database |" << endl;
- cout << "===================================================" << endl << endl;
- mainMenu();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement