Skip to content
Snippets Groups Projects
Commit fbf6dd75 authored by yassin.elhakoun's avatar yassin.elhakoun
Browse files

Update cours_11.md (Il faut déréférencer et mettre à jour le pointeur sur la stack)

parent b60a03b4
No related branches found
No related tags found
No related merge requests found
...@@ -165,7 +165,7 @@ void stack_push(stack *s, int val) { ...@@ -165,7 +165,7 @@ void stack_push(stack *s, int val) {
element *elem = malloc(sizeof(*elem)); element *elem = malloc(sizeof(*elem));
elem->data = val; elem->data = val;
elem->next = *s; elem->next = *s;
s = elem; *s = elem;
} }
``` ```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment