-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
50 lines (36 loc) · 1.08 KB
/
main.cpp
File metadata and controls
50 lines (36 loc) · 1.08 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
/**
* @file main.cpp
* @author Anthony D.
* @date 21 avril 2023
*
* @brief Main file of the contact collection program
* @details This programme allows the user to keep a registery
* of his/her phone contact (number, name, ..)
*
* @note TODO : add email and home address for it to be more completed
*/
#include "fct.hpp"
/** @brief main function */
int main (int argc, char * argv[]) {
GlobalMap contacts;
while (true) {
// wait for user input in the main menu
uint8_t userChoice = WelcomeMenu();
switch (userChoice)
{
case '1': // Show a particular contact to user
DisplayContact(contacts);
break;
case '2': // create and add a contact to registery
CreateContact(contacts);
break;
case '3': // delete a contact to registery
DeleteContact(contacts);
break;
default:
std::cout << "Please choose an available option !" << std::endl;
break;
}
}
return EXIT_SUCCESS;
}