Für Vorlesungen, bitte die Webseite verwenden. https://flavigny.de/lecture
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 line
307B

  1. template<class T>
  2. class Stack : private DLList<T> {
  3. public :
  4. // Default-Konstruktoren + Zuweisung OK
  5. bool empty () {return DLList<T>::empty();}
  6. void push (T t) {
  7. this->insert(DLList<T>::begin(),t);
  8. }
  9. T top () {return *DLList<T>::begin();}
  10. void pop () {this->erase(DLList<T>::begin());}
  11. } ;