-=> Quoting Benjamin L Mcgee to Thomas Maeder
TM> Don't use #define for anything else than conditional
TM> compiling...
TM> Better write
TM> const unsigned int WHEEL_MAX = 13;
TM> const unsigned int STARTING_CASH = 300;
BLM>
BLM> I agree, clearly a better way.
BLM>
BLM> I once had a guy tell me that constants are a waste of code space. I
BLM> still think they are very useful, without regard to the language you
BLM> happen to be using. Knowing the best way to define constants is
BLM> altogether a different thing. :)
There are three cases here.
1) extern const ;
// uses code space
2) const ; /* in C, not C++ */
/* uses code space */
3) const ; // in C++, not C
// only uses code space if you try to take its address
Hope this helps. :-)
... Open mouth, insert foot, echo internationally.
___ Blue Wave/OS2 v2.30
--- FastEcho 1.46
---------------
* Origin: House of Fire BBS - Toronto - (416)601-0085 - v.34 (1:250/536)
|