2011年1月21日

The difference between static_cast and dynamic_cast

摘要: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->//static_cast_Operator_2.cpp//compilewith:/LD/GRclassB{public:virtualvoidTest(){}};classD:publicB{};voidf(B*pb){D*pd1=dynamic_cast<D*>(pb);D*pd2=static_cast<D*>(pb);}if pb really points t 阅读全文

posted @ 2011-01-21 19:57 一颗麦粒 阅读(244) 评论(0) 推荐(0) 编辑

导航