C++ Functions as Modularization Tools

In C++, as in other languages, the programmer hides the complexity of computer algorithms in relatively small units of modularity: functions. Each function is a collection of language statements directed toward achieving a specific goal. These statements can be simple assignments, complex control constructs, or calls to other functions. These other functions can be standard library functions that come with the compiler, specific library functions that come from previous projects, or programmer-defined functions that are custom-made for this particular project.

From the programmer's point of view, the difference between different kinds of functions is that the implementation code of custom-made project functions ...

Get Core C++ A Software Engineering Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.