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 つの引数を取る関数に評価されません
その解決策への助けをいただければ幸いです。