Re: Enumerated lists - (Sorry for the stupid questions.)
Re: Enumerated lists - (Sorry for the stupid questions.)
- Subject: Re: Enumerated lists - (Sorry for the stupid questions.)
- From: Ondra Cada <email@hidden>
- Date: Tue, 25 Sep 2001 16:45:27 +0200
KenBotwinick,
>
>>>>> John Hornkvist (JH) wrote at Tue, 25 Sep 2001 15:18:23 +0200:
JH> >The following gives "undefined type, found 'HexConditions'". As far as
JH> >I can tell this is where you are supposed to declare enumerated lists.
JH> >Any ideas...
JH>
JH> typedef enum {
JH> fine = 0,
JH> rubble,
JH> fire,
JH> smoke
JH> } HexConditions;
Or
enum HexConditions { fine /* =0 is superfluous */,rubble,fire,smoke };
enum HexConditions hexCondition;
The typedef's IMHO much better, but you can choose which suits you.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc