From 7c14e3cdd9f4de7169cd471eb7c401f2343781e7 Mon Sep 17 00:00:00 2001 From: "yassin.elhakoun" <yassin.el-hakouni@etu.hesge.ch> Date: Wed, 13 Dec 2023 16:35:56 +0100 Subject: [PATCH] =?UTF-8?q?Update=20allocation=5Fdynamique.md=20(type=20de?= =?UTF-8?q?=20retour=20de=20initialize=5Fto=20=C3=A9tait=20d=C3=A9clar?= =?UTF-8?q?=C3=A9=20comme=20uint32=5Ft,=20mais=20retourne=20un=20tableau?= =?UTF-8?q?=20int32=5Ft*)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- slides/allocation_dynamique.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slides/allocation_dynamique.md b/slides/allocation_dynamique.md index 0a1d83e..89db5b0 100644 --- a/slides/allocation_dynamique.md +++ b/slides/allocation_dynamique.md @@ -152,7 +152,7 @@ free(p); // ne pas oublier . . . ```C -uint32_t initialize_to(size_t size, int32_t val) { +int32_t *initialize_to(size_t size, int32_t val) { int32_t *p = malloc(size * sizeof(*p)); for (size_t i = 0; i < size; ++i) { p[i] = val; -- GitLab