dos_compilers/Borland Turbo C++ v1/EXAMPLES/STACK.H

16 lines
269 B
C++
Raw Normal View History

2024-07-02 16:34:51 +02:00
// stack2.h: A Stack class derived from the List class
#include "list.h"
class Stack : public List
{
int top;
public:
Stack() {top = 0;};
Stack(int n) : List(n) {top = 0;};
int push(int elem);
int pop(int& elem);
void print();
};