C++ program crashes at runtime
<p>I have this simple c++ program</p>

<pre><code> #include &lt;cstdlib&gt;
#include &lt;iostream&gt;
#include &lt;math.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;time.h&gt;
#include &lt;vector&gt;

using namespace std;
int aleator(int n) 
{
    return (rand()%n)+1;
}
int main() 
{
    int r;
    int indexes[100]={0};
  //  const int size=100;
    //int a[size];
    std::vector&lt;int&gt;v;
    srand(time(0)); 
    for (int i=0;i&lt;25;i++) 
    {
     int index = aleator(100);
     if (indexes[index] != 0)      
    {
        // try again
         i--;
         continue;
     }
    indexes[index] = 1;
    cout &lt;&lt; v[index] ;
    } 
    cout&lt;&lt;" "&lt;&lt;endl;
    system("pause");
    return 0;
}
</code></pre>

<p>But at runtime it crashes, so i got that error with 'Send error report' and 'Don't send'. What i'm doing wrong? Thanks!</p>
