天天看点

什么时候写cmp什么时候写struct

bool cmp(const int &a,const int &b){//const 和 &可以不写
  return a<b;
}      
struct cmp{
    bool operator()(const int &a,const int &b){
        return a<b;
    }
};      

继续阅读