fork download
  1. #include <iostream>
  2.  
  3. void foo(); // My function declaration
  4.  
  5. int main()
  6. {
  7. foo(); // To use this function it must be declared and defined
  8.  
  9. return 0;
  10. }
  11.  
  12. // The function definition
  13. void foo()
  14. {
  15. std::cout << "foo\n";
  16. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
foo