A few vectors of same size. Given element in one of the vectors, fast access to corresponding elements in the other vectors
<pre><code>std::vector&lt;std::string&gt; vec1, vec2, vec3, vec4;
//populate all vectors, all have the same size
//vec1 has different values
</code></pre>

<p>Now given some "key" in vec1, such as "foo", how do I quickly get the corresponding strings from the other vectors?</p>

<p>I will have to do this many times, with different keys in vec1, so this operation has to be fast.</p>

<p>Should I create a map that maps the elements in vec1 into index values (0,1,2,3,4...)?</p>

<p>How is this best done in C++?</p>
