I would like to know if we can sort a pre created set. When I first create the set s_p2, I sort using a different element point.getLength(). but after user input i would lik
std::set stores its members in a sorted fashion. If you walk through the set from .begin() to .end(), you will have a sorted list of items.
std::set
.begin()
.end()
If you don't like the default sort criteria, you may supply a 2nd template parameter to std::set<>
std::set<>