Variable is being used without initialized ?
Salut!
J'ai un petit problème avec ce code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| #include <stdio.h>
#include <conio.h>
#include <windows.h>
int main()
{
char c;
int i=0;
char * tab;
printf("Tapez une chaine de caracteres : ");
while(c = getch() != 0x0D)
{
tab[i] = c;
i++;
}
printf("Retour chariot!\n\n");
system("PAUSE");
return 0;
} |
J'ai une erreur lorsque je tape une touche au clavier alors que j'en ai aucune a la compilation :
The variable 'tab' is being used without being initialized.
J'aimerais bien savoir pourquoi ?
Merci d'avance,
++