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
浙公网安备 33010602011771号