Anfänge von stack

This commit is contained in:
KohlerMaxi committed 2026-11-12 15:26:36 +01:00
1 parent c2cdde6707
commit b9e81dbbac
3 files changed
+54 -5

No files matched your search

+7 -3
View File
@@ -1,13 +1,17 @@
#ifndef STACK_H
#define STACK_H
/* A stack is a special type of queue which uses the LIFO (last in, first out) principle.
This means that with each new element all other elements are pushed deeper into the stack.
/* A stack is a special type of queue which uses the LIFO (last in, first out) principle.
This means that with each new element all other elements are pushed deeper into the stack.
The latest element is taken from the stack. */
#include <stdlib.h>
//TODO: passenden Datentyp als struct anlegen
//Erschaft den stack.
StackNode *create();
// Pushes data as pointer onto the stack.
StackNode *push(StackNode *stack, void *data);