sort a vector of strings according to their length c++

[ad_1]

sort a vector of strings according to their length c++
std::vector v;
std::sort(v.begin(), v.end(), []
    (const std::string& first, const std::string& second){
        return first.size() < second.size();
    });

[ad_2]

Please follow and like us:
Content Protection by DMCA.com