M
Michael
Hi,
This is actually a continued post. I am soooo confused. Why do the
following codes not work? Could you please help me out? Or please tell
me whether it works for you. Then it should be a problem with my
complier.
Thanks a lot!!!
Michael
#include <iostream>
#include <vector>
int main()
{
std::vector<int> v( 10, 1 );
for( int i = 0; i < 10; i++ )
{
std::cout << "v[ " << i << " ] = " << v.at(i);
std::cout << std::endl;
}
return 0;
}
This is actually a continued post. I am soooo confused. Why do the
following codes not work? Could you please help me out? Or please tell
me whether it works for you. Then it should be a problem with my
complier.
Thanks a lot!!!
Michael
#include <iostream>
#include <vector>
int main()
{
std::vector<int> v( 10, 1 );
for( int i = 0; i < 10; i++ )
{
std::cout << "v[ " << i << " ] = " << v.at(i);
std::cout << std::endl;
}
return 0;
}