Switches

Apr 30, 2011 at 2:05pm
How can a switch have two options like if (here=1&&he=2? and if possible a int with a bool
Apr 30, 2011 at 2:09pm
You could make a struct (I think..) and compare those.
Or you could have nested switches.
Either way, using if would be easier.

Switches are kind of useless...
Apr 30, 2011 at 2:11pm
Switches are kind of useless...


They're essentially a tidy stack of if else blocks, with the added utility of fallthrough. I find them very useful.
Apr 30, 2011 at 2:58pm
They're essentially a tidy stack of if else blocks, with the added utility of fallthrough
You are missing "very restricted" there.
Anyway, I suppose this is a matter of taste.
Topic archived. No new replies allowed.