-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
52 lines (48 loc) · 1.32 KB
/
main.cpp
File metadata and controls
52 lines (48 loc) · 1.32 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
48
49
50
51
52
#include <iostream>
#include <windows.h>
#include <string>
#include <typeinfo>
#include "art.h"
#include "menu.h"
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main() {
// Variable declarations, object creation, and console manipulation.
int menChoice = 0, loop = 0;
string menChoiceProxy = "";
Art art;
Menu menu;
string title = "Common Error Repair Tool | CERT";
SetConsoleTitle(title.c_str());
ShowWindow(GetConsoleWindow(), SW_MAXIMIZE);
// Menu Functionality
while (loop != 1) {
art.drawMenu();
cout << "Welcome to CERT. Please select a menu option to continue.\n";
cout << "1. Diagnostics\n";
cout << "2. Repair\n";
cout << "3. Information\n";
cout << "4. Quit\n\n";
cout << "Please select an option: ";
cin >> menChoiceProxy;
menChoice = atoi(menChoiceProxy.c_str());
while (menChoice < 1 || menChoice > 4) {
cout << "Please enter a valid menu option: ";
cin >> menChoiceProxy;
menChoice = atoi(menChoiceProxy.c_str());
}
if (menChoice == 1) {
art.drawDiag();
menu.diagMenu();
} else if (menChoice == 2) {
art.drawRep();
menu.repMenu();
} else if (menChoice == 3) {
art.drawInfo();
menu.infoMenu();
} else {
return 0;
}
}
return 0;
}