www.easyCPlusPlus.com

Easy C++

www.easyCPlusPlus.com

function

by John Kopp

Support this site at no cost to you

Definition: A function is a contained block of code that accomplishes some task. It can be passed parameters and it can return a value. Functions that are part of a class are usually called members. Also known as method.

Examples:

int area(int side)
{
     return (side * side);
}

Related Terms:
• argument
• method
• parameter

Please use the back button on your browser to return to the last page

           Full Glossary