fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct whatever
  5. {
  6. int liczba;
  7. whatever(int liczba):liczba(liczba) {}
  8. };
  9.  
  10. bool operator<(const whatever &a,const whatever &b)
  11. {
  12. return (a.liczba<b.liczba);
  13. }
  14.  
  15. int main()
  16. {
  17. cout<<(whatever(20)<whatever(25))<<endl;
  18. cout<<(whatever(20)<whatever(15))<<endl;
  19. return 0;
  20. }
Success #stdin #stdout 0s 2728KB
stdin
Standard input is empty
stdout
1
0