So, what do you use?

int anInt = (int)aFloat;

or

int anInt = static_cast<int>(aFloat);
// and its brethren

And, more importantly, why?

没有正确的解决方案

许可以下: CC-BY-SA归因
scroll top