title: sort multidimensional vector of ints?
body: <p>Believe it or not, when I search this, I come up with nada.</p>
  
  <p>How can I sort a multidimensional <code>vector</code> of <code>int</code>s by one of the "columns"?</p>
  
  <p>Many thanks in advance!</p>
  
  <p><strong>C++</strong></p>
  
  <pre><code>res = mysql_perform_query(conn, "SELECT column1, column2, column3 FROM table1;");
  std::vector&lt; std::vector&lt; int &gt; &gt; myVector;
  while ((row = mysql_fetch_row(res)) !=NULL){
      int rankedID = atoi(row[0]);
      std::vector&lt; int &gt; tempRow;
      tempRow.push_back(atoi(row[0]));
      tempRow.push_back(atoi(row[1]));
      tempRow.push_back(atoi(row[2]));
      myVector.push_back(tempRow);
  }
  </code></pre>
  
  <p>I'd like to sort <code>myVector</code> by <code>myVector[i][1]</code> descending.</p>
  
  <p>Thanks again!</p>