title: Working with a vector of pair vectors?
body: <p>I've been search around Google but I didn't find what I need. I'm trying to create a vector that allows me to add 3 (and after I'll need to store 4) variables, access and sort them.</p>
  
  <p>I'm implementing the vector as follows for 3 variables:</p>
  
  <pre><code>std::vector&lt;std::pair&lt;std::string, std::pair&lt;int, double&gt; &gt; &gt; chromosomes;
  </code></pre>
  
  <p>To add information (variables), I'm doing:</p>
  
  <pre><code>chromosomes.emplace_back(dirp-&gt;d_name, std::make_pair(WSA, fault_percent));
  </code></pre>
  
  <p>How can I access each parameter and sort them based on the WSA and fault coverage? As in a vector of pair that I can do that using members <code>first</code> and <code>second</code>.</p>
  
  <p>And for 4 variables, it would be as follows?</p>
  
  <pre><code>std::vector&lt;std::pair&lt;std::string, std::string&gt;, std::pair&lt;int, double&gt; &gt; &gt; chromosomes;
  
  chromosomes.emplace_back( std::make_pair(dirp-&gt;d_name, x), std::make_pair(WSA, fault_percent));`
  </code></pre>