next up previous contents
Next: Templates Up: Using const Previous: It is about as   Contents

Use const instead of #define

You should use const instead of #define to declare constant global values so that only one copy of the object exists.


13#13

In the listing above character string for SENTENCE is repeated several times. Thus, the storage for this is repeated several times. A better way is as follows:


14#14

Now there is only one copy of the data.



Falko Kuester 2001-08-24