Uploaded September 2012 | Updated November 2026, 1 day ago
Today's tutorial is about functions. C++ programmers can write their own functions which can then be used as if they were perfectly normal parts of C++. A function is just a block of code with some inputs that returns some answer.
Functions are just another control structure, they allow some useful activity to be called again and again by name instead of having to retype the same code over and over.
The difference between function declaration and function definition is to know. A declaration is just a way of saying "There will be a function that's called xyz, it takes a, b and c as parameters and returns some value". The definition is where we actually define the function's body, the steps the function takes to calculate its answer.
Today's tutorial is about functions. C++ programmers can write their own functions which can then be used as if they were perfectly normal parts of C++. A function is just a block of code with some inputs that returns some answer.
Functions are just another control structure, they allow some useful activity to be called again and again by name instead of having to retype the same code over and over.
The difference between function declaration and function definition is to know. A declaration is just a way of saying "There will be a function that's called xyz, it takes a, b and c as parameters and returns some value". The definition is where we actually define the function's body, the steps the function takes to calculate its answer.










