calling.cpp 462 B

123456789101112131415161718192021
  1. // calling.cpp -- defining, prototyping, and calling a function
  2. #include <iostream>
  3. void simple(); // function prototype
  4. int main()
  5. {
  6. using namespace std;
  7. cout << "main() will call the simple() function:\n";
  8. simple(); // function call
  9. cout << "main() is finished with the simple() function.\n";
  10. // cin.get();
  11. return 0;
  12. }
  13. // function definition
  14. void simple()
  15. {
  16. using namespace std;
  17. cout << "I'm but a simple function.\n";
  18. }