IFs or Case is there a better way?
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement