How does an inline function differ from a preprocessor macro?
The key difference is type checking. The compiler will check whether what you pass as input values is of types that can be passed into the function. That's not true with preprocessor macros - they are expanded prior to any type checking and that can cause severe and hard to detect bugs.
Here are several other less obvious points outlined.
inline functions are similar to macros (because the function code is expanded at the point of the call at compile time), inline functions are parsed by the compiler, whereas macros are expanded by the preprocessor. As a result, there are several important differences:
In some cases, expressions passed as arguments to macros can be evaluated more than once. http://msdn.microsoft.com/en-us/library/bf6bf4cf.aspx
macros are expanded at pre-compile time, you cannot use them for debugging, but you can use inline functions.
-- good article: http://www.codeguru.com/forum/showpost.php?p=1093923&postcount=1
;