I\'ve stumbled upon this problem: I can\'t seem to select the item at the index\' position in a normal std::set. Is this a bug in STD?
std::set
Below a simple ex
There is no way you can access it in constant time.
But you can reach to any element in O(n) time. E.g.
std::set::iterator it; it=my_set.begin(); advance(it,n); cout<<*it;