According to this reply of the question: C Compile error: Id returned 1 Exit status, in English:
Translated, via google Translate:
I can only assume that the old instance of your program is still running. Windows does not allow changing the files currently "in use" and the linker cannot write the new . exe to the top of the running file. Try to stop / kill your program.
I believe this will solve the execution of your code.
1) however there are a number of minor errors in your code, see:
...
main()
{
systen("cls");
//Comentários no código
...
The correct way to write the function is system("cls");
and to use you must include the directive: #include <cstdlib
>
2) Note this section of your code when calling the functions:
...
tela();
telaAjuda();
...
In turn, observe the implementation of its functions:
...
void tela1(){
printf("*** FACEAR - EXEMPLO *** \n\n"); // Impressão na tela
}
void TelaAjuda(){
printf("*** COMPILACAO E EXECUCAO *** \n" );
}
...
Their names are different!
tela
is different of tela1
;
TelaAjuda
is different of telaAjuda
Remember that C++ is Case-sensitive
3) The last mistake, you may notice the warning:
Warning: format ľ%i' expects argument of type ¡int*', but argument 2
has type ễint' [-Wformat=]
in this passage:
//Solicitar um valor
printf("Digite um valor: ");
scanf("%i", a);
The right thing would be:
scanf("%i", &a);
Because the scanf
requires the address of the variable a
.
For more questions about scanf read this reply: Why don’t you need the &
in the scanf();
?