Help!

What does this code do line by line and is there a problem with this code?

int main (){
vector<int> v( 5, 1 );
for( int i = 0; i < 5; i++ )
{ v[i]=i ;
cout << "Element " << i << " is " << v[i] << endl;
}
return 0;
}
Have you tried to run it ?
Topic archived. No new replies allowed.