O'Reilly logo

SAMS Teach Yourself C++ in 10 Minutes SECOND EDITION by Jesse Liberty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Defining Functions

Before you can use a function, you must first define the function header and then the function body.

A function header definition consists of the function's return type, name, and argument list. Figure 7.2 illustrates the parts of the function header.

Figure 7.2. Parts of a function header.

Parameters or Arguments?

The values passed to a function are its arguments. Arguments come in two flavors: formal (in the function header) and actual (in the function call). Formal arguments are also called parameters. Actual arguments are the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required