-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
executable file
·45 lines (36 loc) · 1.06 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
//Almacen de una farmacia PROYECTO FINAL
//fecha: 17 - Julio - 2016 a Octubre de 2020
//Autores: Juan Carlos Herrera, Berenice Morones Alba
#include "./include/menu.hpp"
#include "./include/optionInvocation.hpp"
#include "./include/altas.hpp"
#include "./include/cambios.hpp"
#include "./include/bajas.hpp"
#include "./include/consultas.hpp"
#include "./include/entradas.hpp"
#include "./include/salidas.hpp"
#include <functional>
void executeProgram(int option, std::function<void(objeto &)> (options[]));
int main()
{
int *option = new int;
std::function<void(objeto &)> options[6];
options[0] = &altas;
options[1] = &bajas;
options[2] = &cambios;
options[3] = &consultas;
options[4] = &entradas;
options[5] = &salidas;
executeProgram(*option, options);
delete option;
option = NULL;
return 0;
}
void executeProgram(int option, std::function<void(objeto &)> (options[]))
{
do
{
option = menu();
invokeOption(option, options);
} while (option != 7);
}