I have this global variable:
and this part of code:
But when i run the program it just skips that gets(nomeClient e) and dont ask me for a nomeCliente.
Sorry about my variable aren't in english.
If you could help i would be gratefull.
Thank you, Barbosa.
Code:
...
typedef struct{
int numero;
char nome[200];
char morada[200];
int contacto;
} Cliente;
Cliente clientes[2000];
...
Code:
void adiccionarCliente(){
char nomeCliente[200];
char moradaCliente[200];
int contactoCliente=0;
printf("Introduza o nome do cliente:\n");
gets(nomeCliente);
strcpy(clientes[numeroCliente].nome, nomeCliente);
....
}
Sorry about my variable aren't in english.
If you could help i would be gratefull.
Thank you, Barbosa.
Comment