/*
 * A simple stack implementation (without templates)
 *
 * Description:
 *     A simple stack implementation that accepts integers as its datatype.
 *     Users are able to push to the back, pop from the back, and access the
 *     top element in the same way as they would with STL's stack.
 *
 * Author:
 *     Clara Nguyen
 */
#ifndef __STACK__
#define __STACK__
class cn_stack {
	public:
		struct node {
			int   data;
			node *next,
			     *prev;
			node();
		};
	public:
		cn_stack();
		~cn_stack();
		void clear();
		void push(const int&);
		void pop();
		int size();
		int top();
		void debug_print();
	private:
		node *sentinel;
		int N;
};
#endif