【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;
}

原文地址:https://www.cnblogs.com/happyamyhope/p/9269457.html