我正在从 stl 优先级队列创建一个最小堆。这是我正在使用的课程。
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 ) ;
    }
} ;
我主要是这样实例化一个对象。
 priority_queue<Plane*, vector<Plane*>, Plane> pq1 ;
 pq1.push(new Plane(0, 0)) ;
我收到一个xutility我无法理解的错误。
d:\microsoft visual studio 10.0\vc\include\xutility(674): 错误 C2064: 术语不计算为采用 2 个参数的函数
对其解决方案的任何帮助将不胜感激。