Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下表达式有什么区别?
(short)(l_angle/l_msb * dividend)
和
short(l_angle/l_msb * divident)
我猜第一个是类型转换为短类型,但第二个表达式是做什么的?如果它也是类型转换,它与第一个有什么不同?
是一样的……没有区别。
(int)X
static_cast<int>(X)
int(X)