O'Reilly logo

C++ Without Fear: A Beginner’s Guide That Makes You Feel Smart by Brian Overland

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

4 Functions: Many Are Called

From the earliest days of computers, one of the major goals of programmers has been to avoid having to write the same group of statements over and over. This is the search for reusability, and it is a major reason why object-oriented programming (OOP) was developed. But the most basic technique for writing reusable code is the use of functions—often known as procedures or subroutines in other languages.

A function is a group of related statements that accomplish a specific task. Once you define a function you can execute it whenever you need to. Beyond that functions provide a way to divide a complex program into smaller, more doable tasks. Without this division of labor, serious programming would be just about impossible ...

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