#ifndef STACK_DOUBLEH #define STACK_DOUBLEH #include //for size_t class stack_double { public: typedef double value_type; private: static const size_t max_size = 100; value_type a[max_size]; size_t n; //stack pointer: subscript of next free element public: stack_double(): n(0) {} ~stack_double(); void push(value_type d); value_type pop(); friend bool operator==(const stack_double& s1, const stack_double& s2); }; inline bool operator!=(const stack_double& s1, const stack_double& s2) { return !(s1 == s2); } #endif