fork(1) download
  1. #include <iostream>
  2. #include <typeinfo>
  3. using namespace std;
  4.  
  5. typedef void (*Foo)();
  6. typedef void Bar();
  7.  
  8. void baz() { cout << "baz()\n"; }
  9.  
  10. int main() {
  11.  
  12. Foo foo=baz;
  13. Bar* bar=baz;
  14.  
  15. foo();
  16. bar();
  17. cout << (typeid(foo)==typeid(bar));
  18.  
  19. }
Success #stdin #stdout 0s 3140KB
stdin
Standard input is empty
stdout
baz()
baz()
1