6 Functions and an Introduction to Recursion


In this chapter you’ll:

  • Construct programs modularly from functions.

  • Use common math library functions.

  • Use function prototypes to declare a function.

  • Use random-number generation to implement game-playing applications.

  • Use C++14 digit separators to make numeric literals more readable

  • Understand how the visibility of identifiers is limited to specific regions of programs.

  • Understand how the function call/return mechanism is supported by the function-call stack and activation records.

  • Understand the mechanisms for passing data to functions and returning results.

  • Use inline functions, references and default arguments.

  • Define with the same name overloaded functions that perform different ...

Get C++ How to Program, 10/e now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.