Advertisement
bhok

3.3 Empty Functions

Jul 12th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.86 KB | None | 0 0
  1. // More tutorials at brandonhok.com
  2. #include <iostream>
  3.  
  4. // Is an Oreo cookie still an Oreo cookie without the filling inside?
  5.  
  6. // Empty Functions - Be able to recognize them
  7.  
  8. // A function that is empty doesn't accept or returns any information.
  9. // What is the use? Treat it as a skeleton for a function and be able to recognize it for the moment.
  10.  
  11. //Section 1
  12.  
  13. void emptyChickens();
  14. void noBeef( void );
  15.  
  16. int main()
  17. {
  18.     emptyChickens();
  19.     noBeef();
  20.     system("pause");
  21. }
  22.  
  23. void emptyChickens()
  24. {
  25.     std::cout << "This function has no arguments" << std::endl;
  26. }
  27.  
  28. void noBeef ( void )
  29. {
  30.     std::cout << "This function accept no arguments either" << std::endl;
  31. }
  32.  
  33. // By now I guessing you may or may not know what void means and its usages
  34. // Can you explain what you think it means and its practical usages?
  35. // You may find more information on the web
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement