Bonjour,

j'ai rempli un vector s1,j'ai ensuite compléter un attribut name=s1.at(2).

Cela ne fonctionne pas très bien,le programme s’arrete. J’ai pourtant s1.size() qui est égale à 5.



le message d'erreur dans le compilateur est:

terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 2) >= this->size() (which is 1)

Nom : Capture.JPG
Affichages : 1261
Taille : 43,8 Ko

Nom : Capture1.JPG
Affichages : 539
Taille : 39,8 Ko