O'Reilly logo

Sams Teach Yourself C++ in 24 Hours, Third 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

Declaring and Defining Functions

Before you can call a function, you must first declare the function and then define the function.

The function declaration tells the compiler the name, return type, and types of the parameters of the function. The declaration of a function is called its prototype.

The definition tells the compiler how the function works. No function can be called from any other function unless the called function has first been declared.

Declaring the Function

The built-in functions supplied by your compiler vendor will have their ...

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