摘要: C++中有四中强制类型转换:static_cast,const_cast,reinterpret_cast,dynamic_cast,下面来逐一解释。1)static_cast(a)将地址a转换成类型T,T和a必... 阅读全文
posted @ 2019-03-19 22:51 鲁太师 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 队列的数组实现#includeusing namespace std;templateclass arrayQueue{public: arrayQueue() { first = last = -1; } v... 阅读全文
posted @ 2019-03-19 18:30 鲁太师 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 栈的vector实现#includeusing namespace std;template class stack{public: stack() { pool.reserve(capacity); } vo... 阅读全文
posted @ 2019-03-19 15:51 鲁太师 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 单向链表C++class IntSLLNode{public: IntSLLNode() { next = 0; } IntSLLNode(int i, IntSLLNode *in = 0) { info... 阅读全文
posted @ 2019-03-19 10:49 鲁太师 阅读(93) 评论(0) 推荐(0) 编辑