Difference Between Macros and Inline Functions

Inline function is an important addition in C++. These inline functions mostly are not called and is expanded in line at the invocation place. Hence, these functions are called inline functions. To define a function as inline function, precede function definition with “inline” keyword. Check inline function for more information.

Macros are preprocessor directive which simply substitute patterns in the code. They can be used anywhere in the code, and these are expanded before compilation begins.

(more…)
Difference Between Macros and Inline Functions Read More