Re: Question about "enums"
- From: "Harald van Dijk" <truedfx@xxxxxxxxx>
- Date: 30 Apr 2006 09:46:14 -0700
Ian Collins wrote:
venkatesh wrote:
u can make use of okloop whereever u want "1"What are you replying to? Please quote the context.
if if is not that please correct me
Assuming you are refereing to:
enum loop { NO, YES};
enum loop okloop=YES;
You would use loop whenever you wanted YES. Use an enum for what it is,
if you wanted a synonym for 1, use a const (unsigned) int.
A const int can't be used in constant expressions. I'll admit declaring
okloop as int in that example is probably not a good idea, but do you
have a problem with unnamed enums used to define constants too?
.
- Follow-Ups:
- Re: Question about "enums"
- From: Ian Collins
- Re: Question about "enums"
- References:
- Question about "enums"
- From: mdh
- Re: Question about "enums"
- From: venkatesh
- Re: Question about "enums"
- From: Ian Collins
- Question about "enums"
- Prev by Date: Re: first program with pointers to structures and realloc....
- Next by Date: 3n+1 problem of acm
- Previous by thread: Re: Question about "enums"
- Next by thread: Re: Question about "enums"
- Index(es):