Dear all,
I read in end of Volume 1 of thinking C++ book (guidelines section):
"Avoid the preprocessor. Always use const for value
substitution and inlines for macros."
I like preprocessor and use them, if my macro is big, an inline finction can't answer me.
do you have any idea?
Inline functions can't answer you? Huh? My understanding of inline functions is that they are functions but instead of referring back to the prototype/definition the inline makes the compiler put the function code copied into the function calls location. So I am uncertain what you mean by it can't answer you.
Actually, the inline just tells your compiler that you want the function to be inlined, the compiler isn't required to do it. Likewise, a compiler may choose to inline a function that wasn't explicitly declared as such.