How to access vector class array methods in c++ : <pre><code>class Bird{

public:
    void init();
    Bird();//constructor
    void foo();//its defined somewhere
};


int _tmain(int argc, _TCHAR* argv[])
{
    std::vector &lt;Bird&gt; B[51];

    for (int i = 0; i &lt; 51; i++)
       B[i].foo();
}
</code></pre>

<p>it seems vector is a safe and modern way to generate 51 object safely.</p>

<p>assume Im creating an Object Array from class Bird. and want to use each objects method. (I cant use static object array because I have to swap the array members later.)</p>

<p><br/><br/></p>

<p>(and I didnt use C++ since 2000. Now I have to)</p>
