9.3 Functions as Arguments


9.3 Functions as Arguments

We know that functions can be used as arguments to other functions, such as f(g(x)). Since the add function evaluates to an integer result (the sum of two arguments), it can also be used for arguments to other functions. For example:

      int Result = Add(Add(5,10), Add(7,3)); 




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