for(i=a.begin();i!=a.end();i++)
{
cin>>*i;
}
for(i=a.begin();i!=a.end();i++)
{
cout<<*i;
}
above code works fine but when i use while loop to display vector , program crash.
while(i!=a.end();)
{
cout<<*i;
i++;
}
ravi_14 0 Light Poster
Banfa 597 Posting Pro Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.