title: How to sort two vectors to ensure the data still relates
body: <p>I have the vectors:</p>
  <pre><code>vector&lt;string&gt; countriesName;
  vector&lt;long&gt; countriesPop;
  </code></pre>
  <p>These contain data such as</p>
  <pre><code>countriesName = {&quot;UK&quot;,&quot;GER&quot;,&quot;IRE&quot;};
  countriesPop = {561655,6518,5168};
  </code></pre>
  <p>I am trying to work out how to sort the countries population from smallest to largest while keeping the index's between the two vectors the same.</p>
  <p>I have seen other solutions which require to use a struct and a vector of the structs. However as I have other functions which already rely on the original vectors I would preferably find a solution using these so I dont have to rework a lot of other functions.</p>
  <p>Therefore the output after sorting should go from</p>
  <pre><code>UK 561655
  GER 6518
  IRE 5168  
  </code></pre>
  <p>To</p>
  <pre><code>IRE 5168
  GER 6518
  UK 561655
  </code></pre>