Skip to content
Snippets Groups Projects
Commit a7f58e6d authored by MOSA SAMY's avatar MOSA SAMY
Browse files

Correction alloue_grille et libere_grille

parent a9050009
Branches
Tags 0.1.0
No related merge requests found
......@@ -36,6 +36,7 @@ void copie_grille(grille gs, grille gd)
void alloue_grille(int l, int c, grille *g)
{
g = malloc(sizeof(grille));
g->cellules = malloc(l * sizeof(int *));
for (int i = 0; i < l; i++)
{
......@@ -52,4 +53,5 @@ void libere_grille(grille *g)
for (int i = 0; i < g->nbl; i++)
free(g->cellules[i]);
free(g->cellules);
free(g);
};
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment