McGraw-Hill OnlineMcGraw-Hill Higher EducationLearning Center
Student Center | Instructor Center | Information Center | Home
Workbook
EzWindows Software Packages
Chapter Objectives
Chapter Outline
Chapter Overview
Lab
Self-Check Solutions
Feedback
Help Center


Cohoon/Davidson: C++ Program Design, Third Edition
C++ Program Design, 3/e
James P. Cohoon, University of Virginia
Jack W. Davidson, University of Virginia

Function basics

Chapter 5 Overview

Functions improve clarity and enable software reuse. A function is like an assistant that goes off to perform a particular task and then returns with its solution. In the next two chapters, the design and use of functions is considered in detail. We begin this exploration by examining fundamental concepts such as invocation and parameter passing. We do so by developing programs that use functions from standard software libraries including the iostream library. The iostream library is important because it permits an extensible method of displaying and extracting objects. The use of libraries is facilitated through preprocessor commands. The preprocessor commands support file inclusion, macro definitions, and conditional compilation.