在VC中,不需要四舍五入,可以直接使用强制转换:源码: int iValue = 0; double dbValue = 1.0; //直接使用(int)强制转换: iValue = (int)dbValue;效果: