it = *(s.begin()); set<int>::iterator it; The post was merged to previous Mar 17, 2021 Только так работатет