Well I have have created a queue-datastructure(circular) and tried to minimize (eliminate) all bugs. As far as I know I canīt find anyones ( yeeh sure ). If you guys (or girls) could find someone It would be very appreciated. P.S if you have any suggestions for improved stability/functionality please let me know.

Here it is

Code:class QueueFull{}; class QueueEmpty{}; template <class T> class CQueueArray { public: CQueueArray(int capa = 10); ~CQueueArray(); void enqueue(const T &x); T dequeue(); int getsize() const; private: int front; int back; int currentsize; int capacity; T *pArray; }; template <class T> CQueueArray<T>::CQueueArray(int capa): front(0), back(0), currentsize(0) { capacity = capa; pArray = new T[capacity]; } template <class T> CQueueArray<T>::~CQueueArray() { delete []pArray; } template <class T> void CQueueArray<T>::enqueue(const T &x) { if (currentsize == capacity) throw QueueFull();; currentsize++; pArray[back] = x; back++; //If it reached ītopī then reset front-indicator if (back == capacity) back = 0; } template <class T> T CQueueArray<T>::dequeue() { if (! currentsize) throw QueueEmpty(); currentsize--; T objecttoReturn = pArray[front]; front++; //If it reached ītopī then reset front-indicator if (front == capacity) front = 0; return objecttoReturn; } template <class T> int CQueueArray<T>::getsize() const { return currentsize; }