Some functions are of quite small size, but quite frequently called. Compared with the function call overhead, the program size reduced by not repeatedly include the block of statements may be trivial. In these cases we put "inline" qualifier in front of the function definition to tell compiler to insert the body of the called function into the calling function to avoid a call.

When the inline function is changed, all functions that call it should be re-compiled.

Keyword inline is specially useful for wrapper classes.


Posted By :-Cplusplusprogramming
Designed By Blogger Templates | Templatelib & Distributed By Blogspot Templates