I'll start:
As you can no doubt tell the count variable will be incremented per push and decremented per pop, for whatever reason the user might want to know how many objects are in the queue, so GetCount simply returns count, and IsEmpty() will return true if queue is empty (i.e. count is 0), count should be set to 0 in CQueue's constructor.Code:class CQueue { public: // other methods int GetCount() { return count; } bool IsEmpty(); private: // other vars int count; }; bool CQueue::IsEmpty() { bool empty; if(count) empty = false; else empty = true; return empty; }
I took the easy ones, I hope that's what you're looking for.