can different types of objects be put in one array?
<p>Here is the thing, I have several <code>std::map</code>s, like this:</p>

<pre><code>std::map&lt;int, std::set&gt; map_1;
std::map&lt;int, std::string&gt; map_2;
std::map&lt;int, long&gt; map_3;
...
</code></pre>

<p>And there are also several numbers, each of which relates to one map listed above, like</p>

<pre><code>1 -&gt; map_2
2 -&gt; map_1
3 -&gt; map_3
...
</code></pre>

<p>What I'm trying to do is that, put all the maps into one array, then access each number's map
will be like accessing the element of that array, like this:</p>

<pre><code>arr = [map_2, map_1, map_3];
// let x be a number
map_x = arr[x];
do_something(map_x)
</code></pre>

<p>This way, I can relieve myself of writing <code>switch...case</code>, right?</p>

<p>But can I put them together and how?</p>
