In this chapter, we discuss functions, beginning with an overview of a portion of the C++ Standard Library’s math functions. Next, you’ll learn how to declare a function with more than one parameter. We’ll also present additional information about function prototypes and how the compiler uses them to convert the type of an argument in a function call to the type specified in a function’s parameter list, if necessary.
Next, we’ll take a brief diversion into simulation techniques with random number generation and develop a version of a popular casino dice game that uses most of the C++ capabilities we’ve discussed.
We then present storage-class specifiers and scope rules. These determine the period during which an object exists ...