vector按存儲的結構體的某一字段排序

include include struct Person { string Name; string Sex; int Age; int High; Person() :Age(0) ,High(0) { } };web //定義比較函數 bool CmpAge(const Person& p1,const Person& p2) { return p1.Age < p2.Age;//小於號表示
相關文章
相關標籤/搜索