c++ - What does short(expression) mean? -


this question has answer here:

what difference between following expressions?

 (short)(l_angle/l_msb * dividend) 

and

 short(l_angle/l_msb * divident) 

i guess first 1 type casting short type second expression do? if typecasting, how different first?

it's same thing... there's no difference.

  • c style cast: (int)x
  • c++ style cast: static_cast<int>(x)
  • constructor syntax cast: int(x)

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -