dimanche 30 avril 2017

How to set all expect one element in a vector of bools to true?

Makes a a vector in C++.

 vector<bool> trumpIsGoodFor(42);

Needs to set all the elements expect the 24th element to true.

Wants to do it using a one/two line or elegant assignment using C++11/14.

Aucun commentaire:

Enregistrer un commentaire