sorting vector of vector of strings in C++

后端 未结 4 621
既然无缘
既然无缘 2020-12-21 01:23

I am having trouble to figure out, how to sort a vector of vector of strings, here is the testing code.


#include <iostream>
#include <vector>
#incl         


        
4条回答
  •  醉话见心
    2020-12-21 01:56

    Check out the sort function from algorithm:

    template  void sort ( RandomAccessIterator first, RandomAccessIterator last );
    
    template  void sort ( RandomAccessIterator first, RandomAccessIterator last, Compare comp );
    

    Click here for an example + docs

提交回复
热议问题