program crashing
<p>I m newbie to programming. Please help me with this question.</p>

<p>when i execute this program, program will crash. can anybody tell me the exact reason for the crash?</p>

<pre><code>#include&lt;stdio.h&gt;    
#include&lt;string.h&gt;    
#include&lt;vector&gt;    
using namespace std;    

struct s  
{  
    char *str;  
};  

std::vector&lt;struct s&gt; v;  
int main()  
{  
    struct s s1;  
    strcpy(s1.str,"hi");  
    v.push_back(s1);  
    strcpy(s1.str,"hello");  
    v.push_back(s1);  
    strcpy(s1.str,"How are you");  
    v.push_back(s1);  
    strcpy(s1.str,"AMAZING");  
    v.push_back(s1);  
    for (int i=0;i&lt;(int)v.size();i++)  
    {           
        printf("%s\n",v[i].str);  
    }  
    return 0;  
}  
</code></pre>

<p>i am compiling it in devc++.
pls help.</p>
