fork(4) download
  1. #include <stdio.h>
  2.  
  3. typedef int (*f)();
  4. int variable = 1;
  5.  
  6. int victory()
  7. {
  8. printf("test");
  9. return 0;
  10. }
  11.  
  12. int function()
  13. {
  14. if (variable == 1)
  15. return g();}g(){
  16. 5;
  17. victory();
  18. }
  19.  
  20. int main()
  21. {
  22. function();
  23. return 0;
  24. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int function()’:
prog.cpp:15:18: error: ‘g’ was not declared in this scope
prog.cpp: At global scope:
prog.cpp:15:23: error: ISO C++ forbids declaration of ‘g’ with no type [-fpermissive]
prog.cpp: In function ‘int g()’:
prog.cpp:16:6: warning: statement has no effect [-Wunused-value]
prog.cpp:18:1: warning: no return statement in function returning non-void [-Wreturn-type]
prog.cpp: In function ‘int function()’:
prog.cpp:15:20: warning: control reaches end of non-void function [-Wreturn-type]
stdout
Standard output is empty