Salut,
Sur la forme:
1: COMMENTE ton code!!!
2: Ton indentation et bizarre.... Par contre tu utilise des espace au lieur des tab ,ça c'est bien.
Sur le fond:
void enregistrer(char *ascii)
->
void enregistrer(const char *ascii)
tu déclare des constante à 33, 100, 126 et pourquoi pas 42?
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
| int tableAscii()
{
const char start = '~';
const char stop = '!';
char ascii[stop - start] = {};
char y,i = 0;
int choix = 0;
printf("~~ Table ASCII ~~\n\n\n\n");
printf("Lettre ------- Dec\n");
for(y = start; y <= stop; y++)
{
ascii[i] = y;
printf("%c ------------ %d\n", ascii[i], ascii[i]);
i++;
}
printf("\n\n1- Oui\n2- Non\n\n");
printf("Voulez-vous enregistrer ? : ");
scanf("%d", &choix);
if(choix == 1)
enregistrer(ascii);
else
printf("A bientot !\n");
} |
@+
Partager