Advertisement

IFs or Case is there a better way?

Started by June 28, 2002 08:41 AM
1 comment, last by monkey_32606 22 years, 5 months ago
Is there a better way than using ifs or case to decide on a course of action?. Possibly involving pointers to functions. Total Instant Messanger
Quote: Michael TanczosCut that shit out. You shouldn't be spying on other people.. especially your parents. If your dad wanted to look at horses having sex with transexual eskimo midgets, that's his business and not yours.
If there are only a couple of conditions I''d use if, but if there are a lot I''d use case.

The compiler can optimise large switch blocks into a jump-table, which is fast.

Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
Advertisement
Thanks for the advice

Total Instant Messanger
Quote: Michael TanczosCut that shit out. You shouldn't be spying on other people.. especially your parents. If your dad wanted to look at horses having sex with transexual eskimo midgets, that's his business and not yours.

This topic is closed to new replies.

Advertisement