Error: _BLOCK_TYPE_IS_VALID
<p>While executing code below i get error: _BLOCK_TYPE_IS_VALID. I assume that this has something in common with adding another object to vector but i can't find out where i make a mistake. I don't add class code because previous version of this program was written without using vector and it was running fine. If it would be necessary i can translate variable names to English or explain what which variable is used for.</p>

<pre><code>#include "stdafx.h"
#include "CStop.h"
int _tmain(int argc, _TCHAR* argv[])
{
vector&lt;CStop&gt;Stops;

string* array= NULL;
string name,text;
int length,time,howMany,n;

cout&lt;&lt;"How many stops? "&lt;&lt;endl;
cin&gt;&gt;n;

for(int i = 0; i &lt; n; i++)
{
    cout&lt;&lt;"Type name, length , time, how many stops"&lt;&lt;endl;
    cin&gt;&gt;name&gt;&gt;length&gt;&gt;time&gt;&gt;howMany;
    if(howMany&gt; 0)
    {
        cout&lt;&lt;"Type stops names"&lt;&lt;endl;
        array= new string[howMany];
        for(int i = 0; i&lt;howMany;i++)
        {
            cin&gt;&gt;text;
            array[i] = text;
        }
    }
    CStops temp(name, length,time,howMany,array);
    Stops.push_back(temp);

    if(howMany&gt; 0) delete[] array;
}

for(int i=0;i&lt;Stops.size();i++)
{
    cout&lt;&lt;Stops[i].Info()&lt;&lt;endl;
}
return 0;
}
</code></pre>

<p>Thanks in advance for your help.</p>
