hi guys,
just a very simple question...
for a constant declaration like this: CONST int period_of_no_buy = 5;
should i put this declaration in my header file or my implementation file?
thanks.
regards,
Bosco
If you may need it outside of the implementation file in question, put it in your header file. If that isn't the case, put it in the implementation file.
It's a constant. As long as you're using it as a literal constant, there is no reason to declare it extern although static may be indicated, and certainly defining it in only one implementation file destroys the possibility of the compiler treating it as a compile-time constant in the other implementation files.