Saturday, February 2, 2013

Inline Function in C++


Inline Function:
Inline function’s definition is placed where it is called in the program. It provides faster execution by ignoring the function calling process. Member function of class is defined inline by default. We can define any function as inline using the keyword inline while defining it.

If following statements written in function body, the inline function may not work –
·        If inline function is recursive.
·        Loop, switch and goto statement
·        Static variable
·        Returning from exit(0) statement

0 comments:

Post a Comment

Powered by Blogger.