< Previous | Contents | Next >

Creating Functions

C++ lets you write programs with multiple functions. Your new functions work just like the ones that are part of the standard languagethey go off and perform a task and then return control to your program. A big advantage of writing new functions is it allows you to break up your code into manageable pieces. Just like the functions youve already learned about from the standard library, your new functions should do one job well.


151

152 Chapter 5 n Functions: Mad Lib


 

Introducing the Instructions ProgramDeclaring FunctionsDefining FunctionsCalling FunctionsUnderstanding Abstraction