Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
To avoid the overhead associated with a function call (i.e., creation of a stack frame containing copies of arguments or addresses of reference parameters and the return address), C++ permits you to declare functions to be inline. Such a declaration is a request to the compiler that it replace each call to the function with the fully expanded code of the function. For example:
inline int max(int a, int b){
return a > b ? a : b ;
}
int main(){
int temp = max(3,5);
etc....
}