Inline Functions in CPP..
Inline Functions in CPP..
Inline functions are a C++ feature designed to optimize function calls by replacing
them with the actual function body at the point of call during compilation. This can
potentially improve performance by reducing function call overhead, which includes
saving the return address, pushing arguments onto the stack, and transferring
control to the function.
Declaration:
Compilation:
1. The compiler replaces each function call with the actual function body.
Benefits:
#include <iostream.h>
#include<conio.h>
void main()
{
clrscr();
int num = 5;
getch();
}