Rules For Inline Functions
- Inline function should be used rarely. It should be applied only at appropriate circumstances.
- Inline function can be used when the member function contains few statements. For example,
- If function takes more time to execute, then it must be declared as inline. The following inline function cannot be expanded as inline.
- The member function that performs input and output operation requires more times. Inline functions have one drawback, the entire code of the function is placed at the point of call in caller function and it must be noted at compile time. Therefore, inline functions cannot be placed in standard library or run time library.