Creating Min Heap from STL Priority Queue
I am creating a min heap from stl priority queue. Here is my class which I am using. class Plane { private : int id ; int fuel ; public: Plane():id(0), fuel(0){} Plane(const int _id, const int _fuel):id(_id), fuel(_fuel) {} bool operator > (const Plane &obj) { return ( this->fuel > obj.fuel ? true : false ) ; } } ; In main I instantiate an object thus. priority_queue<Plane*, vector<Plane*>, Plane> pq1 ; pq1.push(new Plane(0, 0)) ; I am getting an error from xutility which I am unable to understand. d:\microsoft visual studio 10.0\vc\include\xutility(674): error C2064: term does not evaluate to