fork download
  1. #include <iostream>
  2.  
  3. struct MyClass {
  4. bool operator()(int a, int b)
  5. {
  6. return a > b;
  7. }
  8. } MyObject;
  9.  
  10. int main() {
  11. std::cout << MyObject(1, 2) << "\n";
  12. std::cout << MyObject(2, 1) << "\n";
  13.  
  14. // your code goes here
  15. return 0;
  16. }
Success #stdin #stdout 0s 4496KB
stdin
Standard input is empty
stdout
0
1