main.cpp

来自「包括顺序链表的查找」· C++ 代码 · 共 40 行

CPP
40
字号
#include <iostream.h>
#include <stdlib.h>
#include <stdio.h>
#include "shunxu.h"
typedef int ElementType;

void main()
{
	ElementType e;
	lNode *head1;
	head1 = new lNode;
	head1->next = NULL; 
//	InitList(head1);
	ListInsert(head1,1,30);
	ListInsert(head1,1,40);
	ListInsert(head1,1,50);
	ListInsert(head1,1,50);
	ListInsert(head1,1,40);
	ListInsert(head1,1,8);
	ListInsert(head1,3,90);
//	print(head1);
	addEnd(head1,100);
	print(head1);
/*	GetElem(head1,5,e);
	cout<<e<<endl;
	ListDelete(head1,4,e);
	cout<<e<<endl;
	cout<<ListLenghth(head1)<<endl;
	print(head1);
	cout<<endl;
	ElementType copy[10]={1,2,3,4,5,6,7,8,9,10};
	CreFro(head1,10,copy);
	print(head1);
	cout<<endl;
//	purge(head1);*/
	cout<<ListLenghth(head1)<<endl;
	invert(head1);
	del_between_min_max(head1,100,20);
	print(head1);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?