Description: 数据结构中采用链式存储堆栈实现数制之间的转换的c++完整源程序-In c++ language to achieve the data structure of system is realized by using chain stack conversion between
Platform: |
Size: 1024 |
Author:邢玉娟 |
Hits:
Description: 1. 编写程序 Node.h 实现例 9-5 的节点类,并编写测试程序 lab9_1.cpp 实现链表的基本操作。
2. 编写程序 link.h 实现例 9-6 的链表类。在测试程序 lab9_2.cpp 中声明两个整型链表 A和 B,分别插入 5 个元素,然后把 B 中的元素加入 A 的尾部。
3. 编写程序 queue.h,用链表实现队列(或栈)类。在测试程序 lab9_3.cpp 中声明一个 整型队列(或栈)对象,插入 5 个整数,压入队列(或栈),再依次取出并显示出来。
-1 Write a program to achieve cases 9-5 Node.h node classes and preparation of test procedures lab9_1.cpp realize list of basic operations. (2) Write a program link.h achieve cases 9-6 objectlist. In the test program lists lab9_2.cpp declare two integers A and B, five elements were inserted, and then B is added to A end of the elements. 3 programming queue.h, using chain queue (or stack) classes. In the test program lab9_3.cpp declare an integer queue (or stack) object, insert five integers, pressed into the queue (or stack), then turn out and displayed. Platform: |
Size: 650240 |
Author:wolf |
Hits:
Description: 1. 声明 Point 类,有坐标_x,_y 两个成员变量;对 Point 类重载“++”(自增)、“--”(自减)运算符,实现对坐标值的改变。
2. 声明一个车(vehicle)基类,有 Run、Stop 等成员函数,由此派生出自行车(bicycle)类、汽车(motorcar)类,从 bicycle 和 motorcar 派生出摩托车(motorcycle)类,它们都有 Run、Stop 等成员函数。观察虚函数的作用。
1. 编写程序 Node.h 实现例 9-5 的节点类,并编写测试程序 lab9_1.cpp 实现链表的基本操作。
2. 编写程序 link.h 实现例 9-6 的链表类。在测试程序 lab9_2.cpp 中声明两个整型链表 A和 B,分别插入 5 个元素,然后把 B 中的元素加入 A 的尾部。
3. 编写程序 queue.h,用链表实现队列(或栈)类。在测试程序 lab9_3.cpp 中声明一个 整型队列(或栈)对象,插入 5 个整数,压入队列(或栈),再依次取出并显示出来。
-1 Point class declaration, coordinates _x, _y two member variables pairs Point class overloads " ++" (increment), " -" (decrement) operator to achieve the coordinate values change. (2) declare a car (vehicle) base class, with Run, Stop and other member functions, and derives a bike (bicycle), automobiles (motorcar) class derived from the bicycle and motorcar motorcycle (motorcycle) class, which are with Run, Stop and other member functions. Observe the role of virtual function. 1 Write a program to achieve cases 9-5 Node.h node classes and preparation of test procedures lab9_1.cpp realize list of basic operations. (2) Write a program link.h achieve cases 9-6 objectlist. In the test program lists lab9_2.cpp declare two integers A and B, five elements were inserted, and then B is added to A end of the elements. 3 programming queue.h, using chain queue (or stack) classes. In the test program lab9_3.cpp declare an integer queue (or stack) object, insert fiv Platform: |
Size: 1031168 |
Author:wolf |
Hits:
Description: 运用基本的数据结构操作,实现简单的功能。其中INVERSE代码实现了一组至多组整形数在单链表中的反序输出操作;mypoly代码实现了多项式在单链表的加减法输出;operation代码实现了利用穿拼接出最大的整形数;括号配对1代码实现了一组至多组括号字符的用顺序栈检查配对情况;身高排序插入代码实现单链表的插入操作。-Using the basic data structure operations to achieve some simple functions. INVERSE code sets up a group of integers reverse order output operations in a single linked list mypoly code displays polynomial subtraction output in a link list operation code through the use of stitching the largest number of combination 括号配对1 code sets up a set of parentheses characters with a sequence of stack checking pairing 身高排序插入 code conducts singly linked list insertion.
Platform: |
Size: 3072 |
Author:杨光浦 |
Hits: