?? linklist.h
字號:
#include "iostream.h"
#include "malloc.h"
#define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define INFEASIBLE -1
#define OVERFLOW -2
#define NULL 0
typedef int Status;
typedef int ElemType;
typedef struct LNode{
ElemType data;
struct LNode *next;
}LNode,*LinkList;
void CreatList_L(LinkList &L,int n)
{
LNode *p,*q;
L=new LNode;
L->next=NULL; p=L;
for(int i=0;i<n;i++)
{
cout<<"請輸入第"<<i+1<<"個數(shù):";
q=new LNode;
cin>>q->data;
q->next=p->next; p->next=q; p=q;
cout<<endl;
}
}
void PrintList_L(LinkList L)
{
LNode *p;
cout<<"輸出鏈表:"<<endl;
p=L->next;
while(p!=NULL)
{
cout<<p->data<<" ";
p=p->next;
}
cout<<endl;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -