Does C++ have an equivilent to Python's __setitem__
<p>Just as the title asks, does C++ have the equivalent of Python's <strong>setitem</strong> and <strong>getitem</strong> for classes?</p>

<p>Basically it allows you to do something like the following.</p>

<pre><code>MyClass anObject;

anObject[0] = 1;
anObject[1] = "foo";
</code></pre>
