fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int foo(int lhs, int rhs) { return lhs + rhs; }
  5.  
  6. int main() {
  7. int (*func)(int a, int b) = &foo;
  8.  
  9. cout << func(13, 42) << endl;
  10. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
55