摘要: C++中允许为函数提供默认参数,又名缺省参数。使用默认参数时的注意事项:① 有函数声明(原型)时,默认参数可以放在函数声明或者定义中,但只能放在二者之一double sqrt(double f = 1.0); //函数声明double sqrt(double f) //函数定义{ // ....... 阅读全文
posted @ 2014-03-25 15:46 LubinLew 阅读(26285) 评论(0) 推荐(4) 编辑
摘要: 1.隐式类型转换1.1 隐式类型转换的规则K & R A.6.5Arithmetic Conversions(数值型间的转换)First, if either operand is long double, the other is converted to long double.Otherwis... 阅读全文
posted @ 2014-03-25 14:42 LubinLew 阅读(535) 评论(0) 推荐(0) 编辑