怎么搞MAIN函数?
#include"stdafx.h"#include "iostream.h"
#include"stdlib.h"
typedef int Elementtype;
struct celltype {
int element;
celltype * next;
};
typedef celltype * LIST;
typedef celltype * position;
celltype * End(celltype * L)
{
celltype * q;
q=L;
while (q->next!=NULL)
q=q->next;
return q;
}
celltype * MakeNull(celltype * & L)
{
L=new celltype;
L->next=NULL;
return L;
}
void Insert(int x,celltype *p)
{
celltype *temp;
temp=p->next;
p->next=new celltype;
p->next->element=x;
p->next->next=temp;
}
void Delete (celltype * p)
{
celltype * q;
if(p->next!=NULL)
{
q=p->next;
p->next=q->next;
delete q;
}
}
celltype *Locate(int x,LIST L)
{
celltype *p;
p=L;
while (p->next!=NULL)
if(p->next->element==x)
return p;
else
p=p->next;
return p;
}
int main(int argc, char* argv[])
{
return 0;
}