En C , je crois que j qi un souci de malloquage
Je veux un quadrillage comme ceci :
les y augmentant vers le bas et les x augmentant vers la droite
0 1 2 3 4 5 6 7 8 9 10
1
2
3
4
5
Donc ici ymax = 5 et xmax = 10
allors moi je fais ca :
(la structure alum contient un char **tab)
alum->tab = xmalloc((alum->nb_line + 1) * sizeof(*alum->tab));
for (i = 0; i <= alum->nb_line + 1; i++)
alum->tab[i] = xmalloc(alum->width * sizeof(**alum->tab));
Qu est ce qui ne va pas la dedans ?