建立:
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <conio.h>
using namespace std;
typedef struct student
{
int data;
struct student *next;
}node;
node* create(int N)
{
node *head,*p,*s;
int i = 0;
head = (node*)malloc(sizeof(node));
p = head;
p->data = 1;
for(i = 2; i <= N; i++)
{
s = (node*)malloc(sizeof(node));
p->next = s;
s->data = i;
p = s;
}
p->next = NULL;
return head;
}