Let's assume that I have the following vector:
std::vector<int> data{0,1,2,3,4};
I would like to replace the sequence {1,2,3} with a single number. I have found an example with std::replace but there a single number is replaced with other single number. How to replace a sequence in vector ?
Aucun commentaire:
Enregistrer un commentaire