Chapter 9: Functions


Overview

Pointers were examined in the previous chapter and their value will be demonstrated here, as this chapter explores another fundamental concept-functions. Functions in C++ are based on the mathematical concept of functions insofar as they generally accept arguments as input, and generally output results. As we shall see, not all C++ functions accept input and not all give output, though many do. In short, functions can be thought of as machines and as a means of dividing code into logical, manageable blocks. Specifically, this chapter examines the following topics:

  • Functions in mathematics

  • Functions in C++

  • Arguments

  • Return types

  • Overloading

  • Pointers and functions

  • Recursion




Introduction to Game Programming with C++
Introduction to Game Programming with C++ (Wordware Game Developers Library)
ISBN: 1598220322
EAN: 2147483647
Year: 2007
Pages: 225
Authors: Alan Thorn

Similar book on Amazon
Beginning C++ Through Game Programming
Beginning C++ Through Game Programming
Beginning Game Programming
Beginning Game Programming
The Ultimate Guide to Video Game Writing and Design
The Ultimate Guide to Video Game Writing and Design

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net