I have declared a vector vector<int> myvect; I am performing push_backs into the vector. Is it okay to do a cout<<myvect[0]; ? Is it better to use iterators? Given the fact that I haven't mentioned the size of myvect initially.
vector<int> myvect;
cout<<myvect[0];
Aucun commentaire:
Enregistrer un commentaire