Thread: Need a C++ guru
View Single Post
  #7  
Old 07-01-2009, 11:00 AM
Yeormom
Discordant
 
Join Date: Apr 2004
Location: 127.0.0.1
Posts: 402
Default

Quote:
Originally Posted by Kobaz View Post
When comparing an int with an unsigned int, are both promoted to a long by the compiler?
You should get in the habbit of casting the variables to the degree of precision you are actually trying to get. By doing so, you never need to smoke test that procedure as you know exactly what will happen every time. It's good programming practice that unfortunately rarely makes it to the hobbyist world.
__________________
Yeorwned
Bane of Life [Custom Classic/PvP]
Reply With Quote