fork download
  1. int foo()
  2. {
  3. return 45;
  4. }
  5.  
  6. int (*foobar)() = nullptr ;
  7.  
  8. struct Tuna { Tuna(); };
  9.  
  10. Tuna::Tuna(){
  11. foobar = foo; // this is an error.. gives me an incompatible type
  12. }
  13.  
  14. int main()
  15. {
  16. foobar = foo ;
  17. Tuna t ;
  18. }
Success #stdin #stdout 0s 3336KB
stdin
Standard input is empty
stdout
Standard output is empty