Implementation of a Priority Queue using C++