fork download
  1. #include <iostream>
  2. using namespace std;
  3. #include <functional>
  4.  
  5. typedef int (*fun)(void);
  6.  
  7. extern "C" {
  8. int test() { return 0; }
  9. }
  10.  
  11. int main() {
  12. fun x = test;
  13. auto f = std::function< int(void) >(x);
  14. // your code goes here
  15. return f();
  16. }
Success #stdin #stdout 0s 3136KB
stdin
Standard input is empty
stdout
Standard output is empty