天天看點

什麼時候寫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;
    }
};      

繼續閱讀