fork download
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <list>
  4.  
  5. using namespace std;
  6.  
  7.  
  8. int main(int argc, const char * argv[])
  9. {
  10. list<int> a = { 3,2,1,5 };
  11. a.sort();
  12. for(auto i: a) cout << i << " ";
  13. }
  14.  
Success #stdin #stdout 0s 4388KB
stdin
Standard input is empty
stdout
1 2 3 5