蒟蒻求问运算符重载
  • 板块学术版
  • 楼主Link_Space
  • 当前回复9
  • 已保存回复9
  • 发布时间2020/12/8 09:05
  • 上次更新2023/11/5 06:26:01
查看原帖
蒟蒻求问运算符重载
278481
Link_Space楼主2020/12/8 09:05

大佬们我这个为什么错误,一直无法编译(我照着百度抄的

struct Prio{
	int lea;
	int point;
	int step;
	bool operator<(const Prio &a) const
	{
		return lea < a.lea;
	}
	Prio(int leave,int nowpoint,int nowstep)
	{
		lea = leave;
		point = nowpoint;
		step = nowstep;
	}
};
priority_queue<Prio, vector<Prio>, greater<Prio> > q;
2020/12/8 09:05
加载中...