title: C++, Sort One Vector Based On Another One
body: <p>The best example I've got is that I want to sort Names based on their Score.</p>
  
  <pre><code>vector &lt;string&gt; Names {"Karl", "Martin", "Paul", "Jennie"};
  vector &lt;int&gt; Score{45, 5, 14, 24};
  </code></pre>
  
  <p>So if I sort the score to {5, 14, 24, 45}, the names should also be sorted based on their score.</p>