摘要:
C++风格的转型运算符小结 为了改正C中丑陋的转型操作,C++中引入了四个新的转型操作符,分别是: dynamic_cast const_cast static_cast reinterpret_cast 1.dynamic_cast 这个转型操作符主要用在安全的向下转型(safe downcasting)中,也就是从基类指针/引用向派生类指针/引用的转型。例如: Code: [View Mo... 阅读全文
posted @ 2005-07-19 11:38
浙林龙哥
阅读(707)
评论(0)
推荐(0)
浙公网安备 33010602011771号