00001 00002 // Praktikum Informatik 1 00003 // Versuch 5: Dynamische Datenstrukturen 00004 // 00005 // Datei: Stack.h 00006 // Inhalt: Stack mit Push-, Pop- und Ausgabe-Funktion 00008 00009 #ifndef STACK_H_ 00010 #define STACK_H_ 00011 00015 00016 #include <iostream> 00017 #include <string> 00018 00019 using namespace std; 00020 00021 #include "Student.h" 00022 00026 00027 // Stackstruktur 00032 struct Stack 00033 { 00034 00036 Stack(); 00038 void push(const Student& stud); 00040 void ausgabe(); 00042 bool pop(Student& stud); 00043 00048 struct ListElem 00049 { 00051 Student data; 00053 ListElem* next; 00054 }; 00056 ListElem* head; 00058 ListElem* tail; 00059 }; 00060 00061 #endif /*STACK_H_*/