How to access an index in a vector in a map from strings to vectors
<p>If I have the following code, which stores 3 vectors as values in an unordered_map and maps to them via the string in their first index as a key:</p>

<pre><code>unordered_map&lt;string, vector &lt;vector&lt;string&gt;&gt;&gt; my_map;
vector&lt;string&gt; vec1 = {"banana", "apple"};
vector&lt;string&gt; vec2 = {"banana", "banana"};
vector&lt;string&gt; vec3 = {"banana", "pear"};

my_map["banana"].push_back(vec1);
my_map["banana"].push_back(vec2);
my_map["banana"].push_back(vec3);

cout &lt;&lt; my_map["banana"][0] &lt;&lt; my_map["banana"][1] &lt;&lt; my_map["banana"][2];
</code></pre>

<p>How can I access specific indices of the unordered_map's vector? I tried to do this in the last line but it does not work. I have also tried using .at(0), etc instead of the double brackets but that also did not work. </p>