C++ Sort a vector of vector of strings with comparator. Please help me understand
<p>I am trying to sort a vector of vector of strings but I don't understand how to create a comparator functions.</p>

<p>I saw this thread but could not implement into my situation:
<a href="http://stackoverflow.com/questions/7114442/sorting-vector-of-vector-of-strings-in-c">sorting vector of vector of strings in C++</a></p>

<p>so I have a vector of vector of strings looking like this:
<br>hello, world, 1, 3, 4, 7, 2, 1
<br>world, hello, 1, 4, 8, 4 ,2, 1
<br>phone, mouse, 2, 3, 5, 2, 1, 4</p>

<p>I need to sort this vector of vector string by columns that my user specifies. My user can specify more than one column to sort. Let say column 3 and 5. Column 3(1,1,2) has same value for row 1 and 2, then we have to sort by column 5. To not complicate things, this is all by ascending order.</p>

<p>I don't understand the concept of how it works when you pass it to the comparator function. How does my function gets looped inside the example posted by the people in those threads? </p>

<p>Anyways thanks in advance!</p>
