blangela said:
Can somepoint me to a good discussion on the pros and cons of using
#define versus a constant variable in your C+ application?
A #define has always global scope in the current compilation unit
(ie. the source file where it's defined) regardless of where you
define it, while a const variable can have any scope (all the way
from global to the whole program to local to one {} block).
You can't have a pointer to a #defined constant, but you can to a
const variable.
A #define can basically only define internal types (ints, etc),
while a const variable can define anything, such as std::strings
and so on.