Go Down

Topic: enumeration declaration (Read 3973 times) previous topic - next topic


Code: [Select]
!strcmp(x, "orange")

It works in that example, but IMO it's bad practice to treat the return value from strcmp() as a boolean since it isn't one. I'd much rather see an explicit comparison with zero. (Apart from that quibble, I think you've described the simplest and most straight forward implementation.)

Yeah, and all if statement expressions should be followed by a compound {} statement  ;)

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131