Skip to content
Snippets Groups Projects
Commit 79edadcc authored by gawen.ackerman's avatar gawen.ackerman :robot:
Browse files

Ajout fonction dequeue - queue.c

parent 2baac242
No related branches found
No related tags found
1 merge request!7Ajout fonction dequeue - queue.c
This commit is part of merge request !7. Comments created here will be created in the context of that merge request.
......@@ -4,3 +4,13 @@ bool is_empty(queue q){
return (q.tail<0);
}
int queue_dequeue(queue *fa) {
int val;
if (!queue_is_empty(*fa)) {
element *e = fa->head;
val = e->data;
fa->head = e->next;
free(e);
}
return val;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment