I read on here that when programming with C++, const variables are better than preprocessor directives, ie #define, for declaring constants. I'm confused about why that is the case.
I understand that a const variable would be stored in static memory, whereas a preprocessor directive would become a literal, and possibly an immediate in assembly, but I don't see why that is a disadvantage.
I've also seen that inline functions are better than macros, but I'm confused about what is the difference.
Thanks!