samedi 2 septembre 2017

make_pair of std::map - how to make a pair only if the key is not listed

Have this code snippet :

enter code here

WHAT I WANT TO ACHIEVE :I want the key value to increment from 0-2 for value1 and 3-4 for value2, then 5-7 for next round of value1. In this algorithm value1 is listed first then value2 then value1 again? just thinking what should i do?

Aucun commentaire:

Enregistrer un commentaire