Ex I have:
Code:
bool operator<(const MyPQ &A,MyPQ &B){return A.getData() < B.getData() }
Code:
#include "PQ.h"
int main()
{
MyPQ<int> pq;
pq.push(2);
pq.push(5);
return 0;
}
then if I call pop method, the highest priority element should remove. Please give me advice how can I use operator < method for that purpose, I am trying is for 2 days but no luck



