for(int i = 0; i < vec.size(); i++){
cout << vec[i] << endl;
}
for(auto i = begin(vec); i != end(vec); i++){
cout << *i << endl;
}
}
vector<int>::iterator ptr;
for (ptr = ar.begin(); ptr < ar.end(); ptr++)
{
//do something at (*ptr)
}