Vector 排序

来源:互联网 发布:教人写小说的软件 编辑:程序博客网 时间:2024/06/05 10:13

//升序排序
   sort( ctn.begin(),  ctn.end(), less<AssessTypeInfo>() );   //或者sort(ctn.begin(), ctn.end())  默认情况为升序

//降序排序

  sort(ctn.begin(), ctn.end(),greater<AssessTypeInfo>())   ;  

原创粉丝点击