title: Creating a link between two vectors in c++
body: <p>This is a conceptual question, so I am not providing the "working code" for this reason.</p>
  
  <p>Imagine one has two std::vector of different types and different number of entities, just for example:</p>
  
  <pre><code>vector &lt;int&gt; A;
  vector &lt;string&gt; B;
  </code></pre>
  
  <p>One has a set of rules following which one can associate any members of A with some(or none) of the members of B. </p>
  
  <p>Is there a way to "store" this connection? </p>
  
  <p>I was thinking that one of the ways to do so is having a <code>vector &lt;map &lt;int, vector &lt;string&gt; &gt; &gt;</code> or <code>vector &lt;map &lt;int, vector &lt;string*&gt; &gt; &gt;</code>, but this solutions seems to me unreliable (if A contains two same numbers for example) and I assume there are much more elegant solutions somewhere there.</p>