关于运算符重载
查看原帖
关于运算符重载
809165
The_Wandering_Earth楼主2023/2/8 19:57
struct node{
    long long u,d;
    bool operator<(const node& hhh)const {
        return d>hhh.d;
    }
};

以上是蒟蒻在dijkstra堆优化时写的运算符重载,想问一下如果重载小于号return到底写大于号还是小于号。

2023/2/8 19:57
加载中...