摘要: 3.1 栈 栈(stack) 又称堆栈,是一种被限定仅在表尾进行插入和删除的线性表。能进行插入和删除的一端成为 栈顶(top) ,另一端称为 栈底(bottom) 。利用栈顶指针记录当前的栈顶位置。在栈顶插入称作 入栈操作 ,在栈顶删除称作 出栈操作 。 栈遵循 “后进先出”(LIFO) 与 “先进 阅读全文
posted @ 2019-03-09 17:01 Gabriel_Ham 阅读(431) 评论(0) 推荐(0) 编辑
摘要: 2.1 线性表定义 线性表 是由长度为n的一组节点组成的有限序列,其中除了首末结点之外,每个结点都有直接的前驱结点和后继结点。 2.2 线性表的顺序存储结构 顺序存储结构使用一组连续的存储单元来存储线性表。 其特点有:线性表的逻辑顺序与物理顺序一致、数据元素之间的关系采用物理位置的相邻来表示。其可以 阅读全文
posted @ 2019-03-03 19:42 Gabriel_Ham 阅读(359) 评论(0) 推荐(0) 编辑
摘要: 17.3 Input with cin Typically, you use as follows: C++ redefines for handling input with . It is overloaded for the basic types of C++, as well as the 阅读全文
posted @ 2018-11-28 16:16 Gabriel_Ham 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 17.1 An Overview of C++ Input and Output Unlike other languages that place I/O in keywords, C and C++ leaves I/O purely to implementers. C++'s solutio 阅读全文
posted @ 2018-11-27 20:15 Gabriel_Ham 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 16.4 Generic programming A goal of generic programming is to write code that is independent of data types. The STL goes further by providing a generic 阅读全文
posted @ 2018-11-22 14:44 Gabriel_Ham 阅读(154) 评论(0) 推荐(0) 编辑
摘要: (这已经是第二次博客园吞我东西了,有点心态爆炸) 16.1 The string Class ) Constructing a string Here is a table which shows the seven form of constructors that the class has: 阅读全文
posted @ 2018-11-20 15:36 Gabriel_Ham 阅读(185) 评论(0) 推荐(0) 编辑
摘要: // 这个part因为网络问题被吞了一部分 15.3 Exceptions ) Calling When you already know the conditions of failure, you may detect them and call if true to terminate the 阅读全文
posted @ 2018-11-17 15:30 Gabriel_Ham 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 15.1 Friends ) When you want to make class A's private members accessible to class B, let B be a friend class of A by declaring `friend class B;': Sup 阅读全文
posted @ 2018-11-15 22:03 Gabriel_Ham 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 14.4 Class Templates ) Templates provide parameterized types, which is capable of passing a type name as a recipe for building a class or a function. 阅读全文
posted @ 2018-11-15 14:25 Gabriel_Ham 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 14.1 Classes with object members ) The valarray class To declare an object, you follow the identifier with angle brackets that contain the desired typ 阅读全文
posted @ 2018-11-13 23:19 Gabriel_Ham 阅读(228) 评论(0) 推荐(0) 编辑