Je complète juste un des exemples (tiré d'un vrai code hein…)
usingnamespacestd;vector<int>myIntVector;vector<int>::iteratormyIntVectorIterator;// Add some elements to myIntVectormyIntVector.push_back(1);myIntVector.push_back(2);myIntVector.push_back(3);myIntVector.push_back(4);myIntVector.push_back(5);for(myIntVectorIterator=myIntVector.begin();myIntVectorIterator!=myIntVector.end();myIntVectorIterator++)if(*myIntVectorIterator%2){cout<<*myIntVectorIterator<<" ";//Should output 1 3 5// bla bla bla// bla bla}else{// bla bla}
Oui, en général quand tu vois ça il y a subitement pas mal de supplices qui te viennes à l'esprit ;-)
[^] # Re: Code auto-documenté
Posté par CrEv (site web personnel) . En réponse au journal To comment or not to comment. That is the question.. Évalué à 5.
Je complète juste un des exemples (tiré d'un vrai code hein…)
Oui, en général quand tu vois ça il y a subitement pas mal de supplices qui te viennes à l'esprit ;-)