Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
felipe medeiros
ProjetoLP1
Commits
af33cb77
Commit
af33cb77
authored
Apr 07, 2017
by
felipe medeiros
Browse files
Delete main.cpp
parent
f52010ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main.cpp
deleted
100644 → 0
View file @
f52010ba
#include
<iostream>
#include
<string>
#include
<stdlib.h>
#include
"../include/traducao.h"
#include
"../include/manip.h"
using
namespace
std
;
#define cls system("/usr/bin/clear")
//#define cls system("cls")
int
main
(){
string
textoBruto
;
//string responsavel por armazenar o texto de entrada do usuario
int
opc
;
//variavel que guarda a escolha do usuario no menu
//Conversei com o senhor sobre o uso do ponteiro de funcao
//o senho pediu para que eu comentasse para naão esquecer
string
(
*
ptrFuncao
)
(
string
);
ptrFuncao
=
allMin
;
void
(
*
ptrFuncao2
)
(
string
);
ptrFuncao2
=
conversor
;
bool
sair
=
false
;
while
(
!
sair
){
cls
;
cout
<<
"Menu de selecao:
\n\n
"
;
cout
<<
"(1) - Texto para morse"
<<
endl
;
cout
<<
"(2) - Morse para texto"
<<
endl
;
cout
<<
"(0) - Sair
\n\n\n
Escolha: "
;
cin
>>
opc
;
cin
.
ignore
();
switch
(
opc
){
case
1
:
cout
<<
"
\n\n
Digite o texto que deseja traduzir: "
;
getline
(
cin
,
textoBruto
);
textoBruto
=
ptrFuncao
(
textoBruto
);
ptrFuncao2
(
textoBruto
);
break
;
case
2
:
conversor
();
break
;
case
0
:
sair
=
true
;
break
;
default:
cout
<<
"Valor invalido.
\n
"
;
break
;
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment