fork download
  1. #include <iostream>
  2. typedef int(*summ_func)(int, int);
  3.  
  4. int int_summ(int rhs, int lhs)
  5. {
  6. return rhs+lhs;
  7. }
  8.  
  9. int main()
  10. {
  11. summ_func func = &int_summ;
  12. std::cout<<func(1, 1)<<std::endl;
  13. return 0;
  14. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
2