Start here · Essential guide
What Is a Function Prototype in C++?
A function prototype tells the C++ compiler a function's name, return type and parameters before it is defined. Covers syntax, examples and common mistakes.
Syntax and Functions
What a function prototype is and how it relates to a function definition.
Start here · Essential guide
A function prototype tells the C++ compiler a function's name, return type and parameters before it is defined. Covers syntax, examples and common mistakes.
A function definition gives a C++ function its full code: return type, name, parameters and the body in braces. Learn the parts with a short example.
See a function prototype example in C++: a working program that declares a function above main and defines it below. Includes common compile errors.
In C++, a function prototype is a declaration of a function's name and types with no body. Learn what the term means and how the compiler uses it.
Related topics