【c++基础】vector中按照Point类型某一个变量进行排序

 

code

//
sort(a.begin(), a.end(), cmpy);

//subfunction
bool cmpy(cv::Point const& a, cv::Point const& b)
{
    return a.y < b.y;
}

 

posted on 2018-07-05 17:14  鹅要长大  阅读(2125)  评论(0编辑  收藏  举报

导航