title: how to sort a triple in C++?
body: <p>I want to know how to sort the triple below based on the first column using C++?
  Can I use std::map?</p>
  
  <pre><code>0 0 1
  1 2 0
  2 0 3
  0 1 4
  </code></pre>
  
  <p>the wanted result is </p>
  
  <pre><code>0 0 1
  0 1 4
  1 2 0
  2 0 3
  </code></pre>