-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
56 lines (46 loc) · 767 Bytes
/
main.cpp
File metadata and controls
56 lines (46 loc) · 767 Bytes
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
53
54
55
56
#include <iostream>
#include "menu.h"
bool test1();
bool test2();
bool subMenu();
int main()
{
menu("MAIN MENU",
{
{"Test 1", test1},
{"Test 2", test2},
{"SubMenu", subMenu},
});
return 0;
}
// ---
bool test1()
{
std::cout << "test 1" << std::endl;
return true;
}
bool test2()
{
std::cout << "test two" << std::endl;
return false;
}
bool test3();
bool test4();
bool subMenu()
{
return menu("SubMenu",
{
{"Test 3", test3},
{"Test 4", test4},
});
}
bool test3()
{
std::cout << "test さん" << std::endl;
return true;
}
bool test4()
{
std::cout << "test 四" << std::endl;
return false;
}