Advertisement
jtentor

DemoStack1 - Cpp - stack.h

May 9th, 2020
1,233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. //
  2. // Created by Julio Tentor <jtentor@fi.unju.edu.ar>
  3. //
  4.  
  5. #ifndef DEMOSTACK1_STACK_H
  6. #define DEMOSTACK1_STACK_H
  7.  
  8.  
  9. class stack {
  10. public:
  11.     stack(int capacidad = 10);
  12.     virtual ~stack();
  13.     void push(const char elemento);
  14.     char pop();
  15.     char peek();
  16.     char top() { return this->peek(); }
  17.     bool empty();
  18.     int count();
  19.  
  20. private:
  21.     int capacidad;
  22.     char *datos;
  23.     int cuenta;
  24. };
  25.  
  26.  
  27. #endif //DEMOSTACK1_STACK_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement