📄 define.h
字号:
#include<malloc.h>
#include<iostream.h>
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
#define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define OVERFLOW -2
#define pr printf
#define kg endl<<endl<<endl
typedef int elemtypel;
typedef char elemtypes;
typedef int status;
typedef struct node
{
elemtypel data;
struct node *next;
}node, *link;
typedef struct snode
{
struct snode *prior;
elemtypes data;
struct snode *next;
}snode, *slink;
typedef enum tag {lin,thread};
typedef struct tnode
{
char data;
tag ltag,rtag;
struct tnode *left,*right;
}tnode, *tlink;
int flag,flag2,s,tag;
tlink T,thrt,pre;
link L;
slink S;
elemtypel e;
elemtypes c;
int select()
{
int n;
cout<<" *********************************************************************** "<<endl;
cout<<" * 1.单链表 * "<<endl;
cout<<" * 2.双向循环链表 * "<<endl;
cout<<" * 3.二叉树 * "<<endl;
cout<<" * 4.表达式求值 * "<<endl;
cout<<" * 5.霍夫曼编码 * "<<endl;
cout<<" * 6.强大霍夫曼编码 * "<<endl;
cout<<" * 7.图 * "<<endl;
cout<<" * 8. * "<<endl;
cout<<" * 9. * "<<endl;
cout<<" * 0. * "<<endl;
cout<<" *********************************************************************** "<<endl;
cout<<" 选择你想进行的操作: "<<endl;
cout<<"请选择0~9!"<<endl;
cin>>n;
for(;;)
{
if(n<0||n>9)
{
cout<<"重选"<<endl;
cin>>n;
}
else
break;
}
return n;
}
void end()
{
flag=0;flag2=0;
cout<<"\t"<<"\t"<<"made by "<<"\130\151\157"<<"\156"<<(char)103
<<"\x43"<<"\x68"<<"\x61"<<"\x6E"<<"\x67"<<"\t"<<(char)24<<kg;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -