fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void foo (int a);
  5.  
  6. int main() {
  7. void* target;
  8. target = static_cast<void*> (&foo);
  9. }
Compilation error #stdin compilation error #stdout 0s 3456KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:8:35: error: invalid static_cast from type 'void (*)(int)' to type 'void*'
  target = static_cast<void*> (&foo);
                                   ^
stdout
Standard output is empty