用标准C++写的单链表的一些基本操作,包括创建、删除、插入、排序、合并、求中间位置、逆置等常见操作。代码均调试通过。
C++单链表基本操作(代码)
#include <iostream>
#include <stdlib.h>
#include <assert.h>
using namespace std;
// list node structure
typedef struct _NODE{
// create a list, return the pointer to the head node
PNODE create()
{
temp = new NODE;
current = temp;
temp = new NODE; cin >> data; assert(temp != NULL);
temp->data = data;
cnt++; while(temp->data != 0) if(cnt == 1) { // head node current = temp; { assert(temp != NULL); cin >> data; cout << "Please input numbers, end with 0" << endl; temp->data = data; PNODE head = NULL; PNODE current = NULL; PNODE temp = NULL; int data = 0; int cnt = 1; int data; struct _NODE *next; }NODE, *PNODE; head = current; }else{ } current->next = temp;
数据结构c++顺序表、单链表的基本操作,查找、排序代码_计算机软件及应用_IT/..."; int c; cin>>c; if(c<1
单链表的基本操作实现代码 5页 5财富值 C语言单链表 5页 1财富值 那个女人...单链表基本操作 学号 日期 2011-11-4 一、实验目的 熟练掌握线性表的类型定义...
★单链表基本操作(C++代码... 10页 免费 单链表的基本操作演示 132页 5财富值搜你所想,读你所爱 拒绝盗版,营造绿色文库 如要投诉违规内容,请到百度文库...
C++单链表的基本操作源代码C++单链表的基本操作源代码隐藏>> 单链表的基本操作(*) [问题描述] 问题描述] 实现带头结点的单链表的建立、求长度,取元素、修改...
单链表的基本操作 隐藏>> #include<stdio.h> #include<stdlib.h> // 函数结果状态代码 #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0...
★单链表基本操作(C++代码... 10页 免费喜欢此文档的还喜欢 单链表的建立及... 获取单链表L中第i个位置上的数据元素 Status GetElem_L(LinkList L,int i,...
单链表基本操作(C++版)_IT认证_资格考试/认证_教育专区。在校学生XL写的单链... 单链表基本操作(C++版) 6页 免费 C语言 单链表的基本操作... 4页 3下载...
单链表的基本操作实现代码_IT/计算机_专业资料。实验一 线性表的基本操作及其应用 一、实验目的 1、帮助读者复习 C 语言程序设计中的知识。 2、熟悉线性表的...
36页 免费 C语言链表 91页 免费 ★单链表基本操作(C++代码... 10页 免费 C++链表应用 7页 免费 C++指针与动态分配内存new... 6页 免费...
数据结构—单链表基本操作... 4页 2财富值 单链表的基本操作实现代码 5页 ... 单链表的建立及其基本操作... 4页 5财富值 C语言 单链表的基本操作(创.....
热门文档