Hash Fellow robcat2075 Posted January 8 Hash Fellow Posted January 8 John Purcell introduces functions, a form of reusable code. When you invoke a function, that causes the program to depart to another portion of your code, execute it, then return to just after the original function call. This first lesson on functions does not yet consider the important function return values or function parameters, but those are coming. Sample lesson idea: Copy the code of your Case and Switch program into a new C++ project and modify it to print the opening title and explanation via a function that is called, rather than having those hard coded into the main() loop of your program If your Case and Switch program didn't have an opening title and explanation... invent one for your function to print! Quote
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.