摘要: 题目来自C++语言程序设计(第四版) 作者郑莉 习题6-24 下面是代码基于char*的实现: /* * @Author: Hellcat * @Date: 2020-03-24 11:44:47 * This file is MyString.h */ // class with pointer 阅读全文
posted @ 2020-03-25 15:48 hellcat9 阅读(1212) 评论(0) 推荐(0) 编辑
摘要: (1) Composition(复合) 设计模式: have-a 以STL中的queue为例: queue依托于双端队列deque来实现, 用UML图可表示为: template <class T, class Sequence = deque<T> > class queue { ... prot 阅读全文
posted @ 2020-03-25 15:13 hellcat9 阅读(701) 评论(0) 推荐(0) 编辑