This question already has an answer here:
I have a map called assets
returned from a const function, I use a const_iterator to get a subset of the map like this:
std::map<int, Asset>::const_iterator start = assets.begin();
start += 5;
......
But I got error: error: no match for ‘operator+=’ (operand types are ‘std::map<int, Asset>::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const int, Asset> >}’ and ‘int’)
Aucun commentaire:
Enregistrer un commentaire