Inline Function In CPP

In inline function, the whole function is called to the calling function directly.

If there is more task then the speed is slow. Inline keyword is used in front of the function.

#include<iostream.h>
#include<conio.h>

inline void fun()
{
cout << "function called" << endl;
}
void main()
{
clrscr();
fun();
getch();
}

Leave a Reply