From: Jérôme Benoit Date: Mon, 13 Mar 2017 14:06:35 +0000 (+0100) Subject: TP 11 exo1: deconstify where appropriate X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=ba8488e5c6979a346c7a364affd31512142bac3d;p=TD_C.git TP 11 exo1: deconstify where appropriate Signed-off-by: Jérôme Benoit --- diff --git a/TP_13/exo1/src/main.c b/TP_13/exo1/src/main.c index 9f23749..41facd6 100644 --- a/TP_13/exo1/src/main.c +++ b/TP_13/exo1/src/main.c @@ -7,19 +7,19 @@ int main() { int* tab = NULL; - const unsigned tab_size = 11; + unsigned tab_size = 11; tab = create_tab(tab, tab_size); printf("%d\n", tab_size); display_array(tab, tab_size); - const unsigned tab_new_size = 20; - tab = resize_tab(tab, tab_new_size); + tab_size = 20; + tab = resize_tab(tab, tab_size); - printf("%d\n", tab_new_size); + printf("%d\n", tab_size); - display_array(tab, tab_new_size); + display_array(tab, tab_size); free_tab(tab); exit(EXIT_SUCCESS);