Sujet : Re: enum sets
De : fir (at) *nospam* grunge.pl (fir)
Groupes : comp.lang.cDate : 29. Aug 2024, 13:10:55
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <69d954a3eb3e76ddc471ce29d6eea06454b46bd8@i2pn2.org>
References : 1 2 3 4
User-Agent : Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24
fir wrote:
>
as to enums i dislike them a lot.. realy sometimes is better tu use
'asd' and sometimes even strings and comepare by strcomp
>
im not sure though how to make 'shgshg' (name it a char literal form of adhoc enums or tags) up to 8 chars work as 8 chars would suffice in many cases
asked but no one answered
long long unsigned tag ;
void foo(long long unsigned tag)
{
if(tag=='warsaw') printf("warsaw");
if(tag=='paris') printf("paris");
if(tag=='new york') printf("new york");
}
foo('paris');