alfps

Untitled

Dec 5th, 2020
882
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <set>
  2. using   std::multiset;
  3.  
  4. #include <kickstart/all.hpp>
  5. using namespace kickstart::all; // array, out, with_exceptions_displayed
  6.  
  7. void cpp_main()
  8. {
  9.     const auto data = array
  10.     {
  11.         2, 5, 76, 53, 2, 89, 4, 76, 2, 2, 43, 53, 53, 2, 89, 76, 76, 99
  12.     };
  13.  
  14.     const auto values = multiset<int>( data.begin(), data.end() );
  15.     for( const int v: values ) {
  16.         out << v << ' ';
  17.     }
  18.     out << endl;
  19.     // Output: 2 2 2 2 2 4 5 43 53 53 53 76 76 76 76 89 89 99
  20. }
  21.  
  22. auto main() -> int { return with_exceptions_displayed( cpp_main ); }
  23.  
RAW Paste Data