Code:
#include<queue> #include<iostream> using namespace std; class CA { public: CA(int parm,int pri):data(parm),priority(pri) {} CA() {} bool operator < (CA rhs) { return data < rhs.GetData(); } bool pricheck (const CA rhs) { return priority < rhs.GetPriority(); }