O'Reilly logo

Beginning C++ Through Game Programming, Fourth Edition by Michael Dawson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 5FUNCTIONS: MAD LIB

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, bitesized chunks of code. In this chapter, you’ll learn about one way—creating new functions. Specifically, you’ll learn to:

images Write new functions

images Accept values into your new functions through parameters

Return information from your new functions through return values ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required