// a _naive_ dstack declaration #ifndef DSTACK_H #define DSTACK_H #include <iostream> class dstack { friend std::ostream &operator<<( std::ostream &os, dstack ds); public: dstack( int size = 128); void push( double d); double pop(); bool is_empty() const; bool is_full() const; private: int capacity; int sp; double *v; }; std::ostream &operator<<( std::ostream &os, dstack ds); #endif /* DSTACK_H */