Chapter 8. ADVENTURES IN FUNCTIONS

You will learn about the following in this chapter:

  • Inline functions

  • Reference variables

  • Passing function arguments by reference

  • Default arguments

  • Function overloading

  • Function templates

  • Function template specializations

  • Separate compilation

  • Storage classes, scope, and linkage

  • Namespaces

With the last chapter under your belt, you now know a lot about C++ functions, but there's much more to come. C++ provides many new function features that separate C++ from its C heritage. The new features include inline functions, passing variables by reference, default argument values, function overloading (polymorphism), and template functions. This chapter discusses these C++ enhancements to functions. Also, it examines multifile ...

Get The Waite Group's C++ Primer Plus, Third Edition 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.