Queue class written in C++