diff --git a/deque.hh b/deque.hh index 8f08345..672d999 100644 --- a/deque.hh +++ b/deque.hh @@ -19,6 +19,12 @@ public: Deque() : head(SIZE-1), tail(0), count(0) { } + void clear() + { + head = SIZE-1; + tail = 0; + count = 0; + } void push_back(TYPE input) { assert(count < SIZE);