Here is a slightly modified answer to your original question that you deleted for no apparent reason. The original contains enough information for you to understand this, but here it goes: let's get smaller than the comparison, which int uses for comparison.
All you have to do is provide a functor that implements less than a strict weak order comparison, or less than an operator for your class that implements it. This structure meets the requirements of:
struct thing { int a; char b; bool operator<(const thing& rhs) const { return a < rhs.a; } };
then
std::priority_queue<thing> q; thing stuff = {42, 'x'}; q.push(stuff); q.push(thing{4242, 'y'}); // C++11 only q.emplace(424242, 'z'); // C++11 only thing otherStuff = q.top(); q.pop();
source share