|
|
|||||
|
Get the Ebook
C Tutorial
Source Code
Function Reference
|
Declaring a function - function prototypestype functionName( type [argname] [, type, ...] );Example: // declare a function prototype for the add function, taking two integer // arguments and returning their sum int add (int lhs, int rhs); In C and C++, functions must be declared before the are used. You can declare a function by providing its return value, name, and the types for its arguments. The names of the arguments are optional. A function definition counts as a function declaration. Related articles Functions tutorial
Want to become a C++ programmer? The Cprogramming.com ebook, Jumping into C++, will walk you through it, step-by-step. Get Jumping into C++ today!
Popular pages
Custom Search
|
||||