How to save collections of objects and use them in c++ vector
<p>I need to use a vector that has a type of MyClass.</p>

<pre><code>vector&lt;MyClass&gt; vMyClass;
vMyClass.Push_Back(new MyClass);
</code></pre>

<p>This does not seem to work for me. What is going wrong? I am trying to simulate a List like in C#.</p>

<p>I then need to perform an action on all items in the list. Like in C# foreach item in vMyClass.</p>

<p>I have looked everywhere for a simple example of this and have had no luck. Please help.</p>
