O'Reilly logo

Exploring C++ 11, Second Edition by Ray Lischner

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

EXPLORATION 21

image

Function Arguments

This Exploration continues the examination of functions introduced in Exploration 20, by focusing on argument-passing. Take a closer look. Remember that arguments are the expressions that you pass to a function in a function call. Parameters are the variables that you declare in the function declaration. This Exploration introduces the topic of function arguments, an area of C++ 11 that is surprisingly complex and subtle.

Argument Passing

Read through Listing 21-1 then answer the questions that follow it.

Listing 21-1.  Function Arguments and Parameters

#include <algorithm>#include <iostream>#include <iterator> ...

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