of pairs as set<pair<int,int>> s;
currently the pairs in set s are (1,1),(2,2) and (3,3)
if i do this :- pair<int,int> d = *s.find({0,3});
what would be the values in pair d ?
'find' doesn't change the set.
This is undefined behavior, You should check what 'find' returns before de-referencing it.
Обсуждают сегодня