-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
40 lines (36 loc) · 1.12 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
#include <stdio.h>
#include <stdlib.h>
#include "libs/opcoes/opcoes.h"
int main() {
bool dadosCarregados = false;
ResultadosCandidatoVetor resultadosV;
CandidatoVetor candidatosV;
CursoVetor cursosV;
VagaVetor vagasV;
while (true) {
int opcao = pegarOpcaoDoMenu(dadosCarregados);
if (opcao == 0) {
carregarArquivos(&cursosV, &vagasV, &candidatosV, &resultadosV);
dadosCarregados = true;
}
else if (opcao == 1) {
gerarArquivosDeSaida(&resultadosV, &candidatosV, &cursosV, &vagasV);
}
else if (opcao == 2) {
pesquisarCandidato(&candidatosV);
}
else if (opcao == 3) {
gerarArquivoDosCandidatosReprovados(&resultadosV, &candidatosV, &cursosV, &vagasV);
}
else if (opcao == 4) {
alterarNotaDaRedacao(&cursosV, &resultadosV, &candidatosV);
}
else if (opcao == 5) {
free(candidatosV.candidatos);
free(resultadosV.resultados);
free(cursosV.cursos);
free(vagasV.vagas);
return 0;
}
}
}