For ex,
unordered_set<int> s ;
s.insert(100);
How do I get value 100 from s ?
From http://www.cplusplus.com/reference/unordered_set/unordered_set/begin/,
Notice that an unordered_set object makes no guarantees on which specific element is considered its first element. But, in any case, the range that goes from its begin to its end covers all the elements in the container (or the bucket), until invalidated.
So s.begin() won't always give me value 100 ?
Please clarify.
Aucun commentaire:
Enregistrer un commentaire