title: Sort vector of vectors
body: <p>I have </p>
  
  <pre><code>    vector&lt;vector&lt;int&gt;&gt; vec 
  </code></pre>
  
  <p>in my c++ app.</p>
  
  <p>Every vector of integers as an element of "big" vector has 4 INT values.
  I want to sort vec basing on third value of it's content vectors of ints (I mean every "inside" vector third element) - is it possible?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Let's say I've got a function </p>
  
  <pre><code>COST(vector&lt;int&gt;)
  </code></pre>
  
  <p>which calculates me some value based on my vector values - can I use it in comparation parameter too? It'd help me a lot more.</p>