#include
#include
using namespace std;
#define LIST_INIT_SIZE 100
#define LISTINCREMENT 10
#define Status int
#define ElemType int
#define OK 1
#define INFEASIBLE -1
typedef struct LNode{
ElemType data;
struct LNode*next;
}LNode,*LinkList;
Status Create(LNode*phead,int length);
Status Put(LNode*phead);
void main()
{
LNode*head;
Create(head,3);
Put(head);
}
Status Create(LNode*phead,int length)
{
LNode*pnew;
phead=NULL;
for(int i=0;i
{
pnew=(LNode*)malloc(sizeof(LNode));
scanf("%d",&pnew->data);
if(phead==NULL)
{
phead=pnew;
pnew=pnew->next;
}
else
pnew=pnew->next;
}
pnew=NULL;
return OK;
}
Status Put(LNode*&phead)
{
LNode*pcur;
for(pcur=phead;pcur!=NULL;pcur=pcur->next)
printf("%d",pcur->data);
return OK;
}