From 1d97ec3c592317db3549070d2e01c28d444f8b45 Mon Sep 17 00:00:00 2001 From: Jerome Benoit Date: Fri, 3 Mar 2017 20:12:53 +0100 Subject: [PATCH] TP 8 exo1: Fix a memory allocation comment. Signed-off-by: Jerome Benoit --- TP_8/exo1/exo1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TP_8/exo1/exo1.c b/TP_8/exo1/exo1.c index b0e5df9..c810c05 100644 --- a/TP_8/exo1/exo1.c +++ b/TP_8/exo1/exo1.c @@ -11,7 +11,8 @@ int main() { int* arr; printf("Longeur?\n"); int size = promptValue(); - //arr = malloc(sizeof(arr[size])); prend la taille de l'élément à la position de l'index = size + //arr[size]; + //arr = malloc(sizeof(arr)); arr = malloc(sizeof(int)*size); for (int i = 0; i < size; i++) { -- 2.34.1