-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMenuExample.cpp
39 lines (38 loc) · 1 KB
/
MenuExample.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
34
35
36
37
38
39
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "Menu.cpp"
void HelloWorld(){
printf("\n\n%s\n\n\n\n","This is exile");
getchar();
}
void power(){
printf("4 kvadrâtâ = %d\n\n",4*4);
getchar();
}
int main(){
Menu *MyMenu;
struct MenuLine MenuLines[] = {
{"HelloWorld Program",&HelloWorld},
{"HelloWorld Program",&HelloWorld},
{"HelloWorld Program",&HelloWorld},
{"HelloWorld Program",&HelloWorld},
{"HelloWorld Program",&HelloWorld},
{"HelloWorld Program",&HelloWorld},
{"HelloWorld Program",&HelloWorld},
{"HelloWorld Program",&HelloWorld},
{"HelloWorld Program",&HelloWorld},
{"HelloWorld Program",&HelloWorld},
{"HelloWorld Program",&HelloWorld},
{"HelloWorld Program",&HelloWorld},
{"Shitso",&HelloWorld},
{"HelloWorld for test", &power}
};
MyMenu = new Menu;
MyMenu->setHeader("Menu Example", true);
if(MyMenu->setLines(MenuLines, sizeof(MenuLines) / sizeof(struct MenuLine)) == 0){
MyMenu->getMenu();
return EXIT_SUCCESS;
}
return EXIT_FAILURE;
}