Every program you’ve seen so far has consisted of one function—
main(). However, once your programs reach a certain size or level of complexity, it becomes hard to work with them like this. Fortunately, there are ways to break up big programs into smaller, bite-sized chunks of code. In this chapter, you’ll learn about one way—creating new functions. Specifically, you’ll learn to:
Write new functions
Accept values into your new functions through parameters
Return information from your new functions through return values
Work with global variables and constants
C++ lets you write programs with multiple functions. Your new functions work just like the ones that are part of ...