Which is better to use for accessing a certan value with in a vector?
myvector.at(i) = i;
myvector[i] = i;
As far as I know, they do both the same thing. Is there any reason to use one over the other?
use of  is simpler, otherwise I don't see any other reason
I found out why,
 is faster and less demanding while .at is safer since it throws out_of_range expection.
Hi, your solutions is very good for two forms, use of operator  is very simpler!!!
for ( int i =0; i < myvector.size(); i++)
cout<< myvector[i] <<endl;