fork download
  1. #include <cstdio>
  2.  
  3. int main()
  4. {
  5. void f(); // Forward declare function named "f" returning void in the
  6. // global namespace.
  7. f();
  8. }
  9.  
  10. /*
  11. void g()
  12. {
  13.   f(); // ERROR!
  14. }
  15. */
  16.  
  17. void f()
  18. {
  19. std::puts("hello!");
  20. }
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
hello!