Re: Preprocessor Push/Pop Idiom, How To?
Robert Kindred wrote:
"Francis Glassborow" <francis@robinton.demon.co.uk> wrote in message
news:4$ohRNCQX5HFFwj9@robinton.demon.co.uk...
In article <4o7h4lFdc1ofU1@individual.net>, Alf P. Steinbach
<alfps@start.no> writes
[]
and all the uses would remain working. I understand the
reasoning here but think that it is misplaced, just leave
the original and the code will work as intended.
What really irritates the h*** out of me is code such as:
enum colour {RED, BLUE, GREEN};
So do you have a standard for enums? I would like to somehow
differentiate them from variables.
Why? What's the difference between:
enum Color { red, blue, green } ;
,
typedef int Color ;
Color const red = 0 ;
Color const blue = 1 ;
Color const green = 2 ;
and
typedef int Color ;
Color red ; // read from configuration file.
Color blue ; // read from configuration file.
Color green ; // read from configuration file.
?
(More than once, I've had the first evolve to the third.)
--
James Kanze GABI Software
Conseils en informatique orient?e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S?mard, 78210 St.-Cyr-l'?cole, France, +33 (0)1 30 23 00 34
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]