1. 程式人生 > >初始化函式的簡單寫法

初始化函式的簡單寫法

struct seg
{
    double l, r, h;
    int flag;
    seg() {}
    seg(double a,double b,double c,int d) : l(a), r(b), h(c), flag(d) {}
    bool operator < (const seg &cmp) const
    {
        return h < cmp.h;
    }
}ss[maxn];