fork download
  1. #include<iostream>
  2. #include<set>
  3.  
  4. int main(){
  5. // Create a set object holding integers
  6. std::set<int> mySet {1,2,3,4,-5};
  7.  
  8. std::cout << *(mySet.end()) <<std::endl;
  9. return 0;
  10. }
Success #stdin #stdout 0s 4548KB
stdin
Standard input is empty
stdout
5