-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
33 lines (18 loc) · 780 Bytes
/
main.cpp
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
#include <iostream>
#include "classes/Menu.cpp"
using namespace std;
int main(){
Menu menu;
while(true){
/* to get the operation*/
menu.printMenu(); //responsible to print the initial menu
int code = (cin >> (cout << "|----------------> Digite o codigo correspondente a operacao que deseja: ", code), code); // responsible to get code from the user.
system("CLS"); //responsible to clear de terminal
if(code == 0) break; //exit the system when user choose 0 on menu.
/* to confirm */
bool confirm = menu.confirmCode(code); //confirm or not the code
/* to handle submit */
if(confirm) menu.handleSubmit(code); //if the code it was confirmed
}
return 0;
}