fork download
  1. #include <iostream>
  2.  
  3. struct adder
  4. {
  5. int operator()(int a, int b) { return a + b; }
  6. };
  7.  
  8. int main()
  9. {
  10. adder my_adder;
  11. std::cout << my_adder(5, 6) << std::endl;
  12. }
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
11