#define versus const
From: johny smith (princetonharvard_at_charter.net)
Date: 05/29/04
- Next message: matthurne: "Simple iterator usage question..."
- Previous message: alex: "console io"
- Next in thread: Gregg: "Re: #define versus const"
- Reply: Gregg: "Re: #define versus const"
- Reply: Heinz Ozwirk: "Re: #define versus const"
- Reply: Unforgiven: "Re: #define versus const"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 28 May 2004 20:08:41 -0600
I have never really understood the difference between
1.) #define NUMBER 1.653
vs.
2.) const double NUMBER = 1.653
I know that the #define is taken care of by the pre-processor and the
compiler is used in the second case but why would one be chosen over the
other.
One book I read suggested that your should prefer the compiler to the
preprocessor, but why does it really matter?
Thanks in advance.
- Next message: matthurne: "Simple iterator usage question..."
- Previous message: alex: "console io"
- Next in thread: Gregg: "Re: #define versus const"
- Reply: Gregg: "Re: #define versus const"
- Reply: Heinz Ozwirk: "Re: #define versus const"
- Reply: Unforgiven: "Re: #define versus const"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|