fork(1) download
  1. #include <cstdio>
  2.  
  3. static int (*GoToDungeon)();
  4.  
  5. static int StepOnDragon() {
  6. printf("Ups, i've stepped on dragon's tail");
  7. return -1;
  8. }
  9.  
  10. void Nevermind() {
  11. GoToDungeon = StepOnDragon;
  12. }
  13.  
  14. int main() {
  15. GoToDungeon();
  16. return 0;
  17. }
Success #stdin #stdout 0s 4544KB
stdin
Standard input is empty
stdout
Ups, i've stepped on dragon's tail