An inline function is a function for which the compiler generates the code for the function body where function is called, in stead of invoking the function through call and return mechanism of function execution.
C++ provides inline specifier for defining such a function:
inline <return_type> function (<arguments>*) { <body> }
Example
inline int f(int a, int b) { return a*b + 4; }
//Code
int x = 3;
int y = 45;
..
auto g = f(x,y);
Here the compiler, instead of pushing x and y values to the function argument stack and then transferring the program pointer to location of function f, it generates code as
int g = x*y +4;
It is advantage over C macros, as compiler can do a type check. An intelligent compiler can generate code for factorial(3) as 6.