A queue implemented using an array We've just finished learning about queues in my data structures class; I want to make sure I really understand it.  I'm still feeling a bit lost on how to optimize the data use of a queue. I've created a little program here:

#include &lt;iostream&gt;

class Queue{
public:
    Queue(int size = 10){
        ptr = new int[size];
        head = counter = 0;
        qSize = size;
    }

    void push(int value){
        if(counter == qSize)
            doubleSize();
        ptr[counter++] = value;   
    }

    int pop(){
        if(counter == 0){
            std::cout &lt;&lt; "The queue is empty!!! \n";
            return -1;
        }
        if(head &gt;= counter - 1){
            int temp = ptr[head];
            std::cout &lt;&lt; "This is the last item in the queue. \n";
            delete[] ptr;
            ptr = new int[qSize];
            head = counter = 0;
            return temp;
        }
        return ptr[head++];   
    }
private:
    int *ptr;
    int head;
    int counter;
    int qSize;

    void doubleSize(){
        int prevSize = qSize;
        qSize *= 2;
        int *temp = new int[qSize];

        for(int i = 0; i &lt; prevSize; i++){
            temp[i] = ptr[i];
        }
        delete[] ptr;
        ptr = temp;
    }
};


So, as you can test, the program runs fine; but what I'm looking for is how I can optimize my queues to be as efficient as possible. I.E. Is there a specific way that I should be programming these queues that uses the minimum amount of data, and has the smallest Order complexity?

P.S. I am aware that there is a queue library. I am more seeking to optimize how I program out queues themselves.
Rule of Zero

You should follow the rule of zero where class that deal with memory ownership should deal exclusively with memory ownership. Your class allocate raw memory but do not free it when being destroyed. It will leak memory. Also issue with copying your queue. You should use std::unique_ptr instead of raw new.

Reuse memory when queue is empty

Why do you need to free the underlying memory when the queue is empty? Can't you just set head to the beginning and reuse the memory? This will save you from having to allocate new memory.

Use STD algorithm

Use std::copy_n instead of for loop in doubleSize() to make your code more readable.