摘要: virtual 对于虚方法(virtual method),如果一个方法是通过引用或者指针而不是对象调用的,它将确定使用哪一种方法。如果没有使用关键字virtual,程序将根据引用类型或指针类型选择方法;如果使用了virtual,程序将根据引用或指针指向的对象的类型来选择方法。 基类通常声明虚析构函 阅读全文
posted @ 2022-03-04 13:49 fwx 阅读(53) 评论(0) 推荐(0)
摘要: 隐式类型转换 Implicit conversion Standard conversions affect fundamental data types, and allow conversions such as the conversions between **1)numerical typ 阅读全文
posted @ 2022-03-04 09:36 fwx 阅读(32) 评论(0) 推荐(0)
摘要: Exceptions provide a way to react to exceptional circumstances (like runtime errors) in programs by transferring control to special functions called h 阅读全文
posted @ 2022-03-04 00:00 fwx 阅读(130) 评论(0) 推荐(0)