cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Help!
Help!
Jan 14, 2018 at 5:25pm UTC
mdustin94
(4)
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;
}
Jan 15, 2018 at 2:54am UTC
SamuelAdams
(1535)
Have you tried to run it ?
Topic archived. No new replies allowed.