#include <iostream>
using namespace std;
const int N=5;
struct Std{
int date;
Std *next;
}*p,*r;
class Student{
private:
Std *first;
int length;
public:
Student();
Student(int a[],int n);
~Student(){}
void Insert(int i,int x);
int Delete(int i);
int Get(int i);
int Locate(int x);
void Show();
};
Student::Student(){
first =new Std;
first->next=NULL;
}
Student::Student(int a[],int n){
first=new Std;
first->next=NULL;
r=first;
for (int i=0;i<n;i++){
p=new Std;
p->date=a[i];
r->next=p;
r=p;
}
r->next=NULL;
lenght=n;
}
void Student::Insert(int i,int x){
r=first;
int j=0;
while (r!&#
实验三单链表
最新推荐文章于 2018-12-06 21:44:55 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)