c++ program stopped working
<p>I am trying to make a program like a car configurator. I have a matrix in witch each line has a car brand, type,fuel usage,type of fuel,etc, and based on some questions addressed to the user, he would be able to see exactly what car he wants.
The problem I have is that, sometimes, at the second question the program stops and I get an error from windows (program.exe has stop working). 
Anyone has any idea why this happens?</p>

<p>Below is a part of the code(the part that crashes)</p>

<pre><code>for(i=0;i&lt;5;i++)
    cout&lt;&lt;i+1&lt;&lt;". pentru "&lt;&lt;marca[i]&lt;&lt;endl;
do
{
    cin&gt;&gt;poz;
    if(poz&lt;0 || poz&gt;5)
        cout&lt;&lt;"Optiune incorecta!Reincercati!"&lt;&lt;endl;
    else
        ok=1;
}
while(!ok);
mycar[0]=marca[poz-1];
cout&lt;&lt;"Alegeti modelul:"&lt;&lt;endl&lt;&lt;"Apasati: "&lt;&lt;endl;
for(i=0;i&lt;16;i++)//crashes somewhere around here!
    if(masini[i][0]==mycar[0])
    {
        cout&lt;&lt;cont+1&lt;&lt;". pentru "&lt;&lt;masini[i][1]&lt;&lt;endl;

        aux[cont]=masini[i][1];
        cont++;
    }
do
{
    cin&gt;&gt;poz;
    if(poz&lt;0 || poz&gt;cont)
        cout&lt;&lt;"Optiune incorecta!Reincercati!"&lt;&lt;endl;
    else
        ok=1;
}
while(!ok);
ok=0;
mycar[1]=aux[poz-1];
for(i=0;i&lt;=cont;i++)
    aux[i]=" ";
cont=0;
cout&lt;&lt;"Alegeti numar usi: "&lt;&lt;endl&lt;&lt;"Apasati: "&lt;&lt;endl;
for(i=0;i&lt;16;i++)
    if(masini[i][0]==mycar[0] &amp;&amp; masini[i][1]==mycar[1])
    {
        cout&lt;&lt;cont+1&lt;&lt;". pentru "&lt;&lt;masini[i][2]&lt;&lt;endl;
        aux[cont]=masini[i][2];
        cont++;
    }
do
{
    cin&gt;&gt;poz;
    if(poz&lt;0 || poz&gt;cont)
        cout&lt;&lt;"Optiune incorecta!Reincercati!"&lt;&lt;endl;
    else
        ok=1;
}
while(!ok);
ok=0;
mycar[2]=aux[poz-1];
for(i=0;i&lt;=cont;i++)
    aux[i]="";
cont=0;
cout&lt;&lt;"Alegeti combustibilul:"&lt;&lt;endl&lt;&lt;"Apasati: "&lt;&lt;endl;
for(i=0;i&lt;16;i++)
    if(masini[i][0]==mycar[0] &amp;&amp; masini[i][1]==mycar[1] &amp;&amp; masini[i][2]==mycar[2])
    {
        cout&lt;&lt;cont+1&lt;&lt;". pentru "&lt;&lt;masini[i][3]&lt;&lt;endl;
        aux[cont]=masini[i][3];
        cont++;
    }
do
{
    cin&gt;&gt;poz;
    if(poz&lt;0 || poz&gt;cont)
        cout&lt;&lt;"Optiune incorecta!Reincercati!"&lt;&lt;endl;
    else
        ok=1;
}
while(!ok);
ok=0;
mycar[3]=aux[poz-1];
</code></pre>

<p>where masini[][] is the matrix with info and in mycar[] i put the info from the user.
I added a comment at the place where the program crashes(at the second for loop)
I hoped I made my problem clear.</p>
