Defining a Function

Learn how to define your own function in C++.

Function definition

A function’s definition tells what a function will do when it is called. The basic syntax for defining a function in C++ is:

Get hands-on with 1200+ tech skills courses.