The standard definition of priority_queue is of the form;
Code:
template<class T, class Container = vector<T>, class Compare = less<typename Container<T>::value_type> >
priority_queue
{
// etc etc.
}
In response to your first question, create an object of type;
Code:
std::priority_queue<T, std::vector<T>, greater<typename std::vector<T>::value_type> >;
A few typedefs would probably be helpful in achieving this
A protected member of priority_queue is the underlying container (which is a vector<T> by default) used by the priority_queue (it's name is c). So create a class that is derived from your priority_queue<> and provide that derived classes with public member functions that provide controlled access to the underlying container. Keep in mind that, as priority_queue<> provides no virtual member functions, there are some constraints on how you can use the derived type.