摘要:
1.static_cast 2.dynamic_cast 3.const_cast4. reinterpret_cast例子1:float x;cout<<static_cast<int>(x);...f(static_cast<string>("hello"));例子2:class Car;class Cabriolet:pbulic Car{};class Limousine:public Car{};void f(Car *cp){ Cabriolet *p = dynamic_cast <Cabriolet*>(cp) 阅读全文
posted @ 2012-03-06 16:02 阳光VIP 阅读(180) 评论(0) 推荐(0) 编辑