O'Reilly logo

Just Enough C/C++ Programming by Guy W. Lecky-Thompson

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

Prototyping

A function prototype can be in one of two places: in a header file (like stdio.h) or in the main source code file. Generally speaking, you should break the program into as many source code files as makes sense for the scope (size) of the project, possibility to reuse functions created for it (or reusing other functions).

For a small program that performs a single task, you might contain all the code in a single source file. For a medium-size project that uses functions that have already been defined alongside some original code, you might also be able to put all the new code in a single source file. However, you might also break the code up if the application covers different functional areas.

If a program contains two source code ...

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