摘要: 作用:将一个基类对象指针(或引用)cast到继承类指针,dynamic_cast会根据基类指针是否真正指向继承类指针来做相应处理, 即会作一定的判断。 对指针进行dynamic_cast,失败返回null,成功返回正常cast后的对象指针; 对引用进行dynamic_cast,失败抛出一个异常,成功 阅读全文
posted @ 2017-05-02 11:15 奔跑的河马 阅读(263) 评论(0) 推荐(0) 编辑
摘要: template< class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T> > > class map; class Key, class 阅读全文
posted @ 2017-05-02 11:14 奔跑的河马 阅读(227) 评论(0) 推荐(0) 编辑