1 / 29
文档名称:

C语言程序设计-图书管理系统-源代码.docx

格式:docx   页数:29
下载后只包含 1 个 DOCX 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

C语言程序设计-图书管理系统-源代码.docx

上传人:3346389411 2013/3/24 文件大小:0 KB

下载得到文件列表

C语言程序设计-图书管理系统-源代码.docx

文档介绍

文档介绍:# include< >
# include< >
# include< >
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
struct tushu_node{
int num;
char leibie[20];
char name[30];
char author[20];
char press[20];
char time[20];
double price;
struct tushu_node*next;};

FILE *fpp; /*定义fpp为全局变量*/
struct tushu_node*head,*tail,*p;

int quanxian(); /* 核查权限的函数*/
int inputchioce(); /* 显示主菜单的函数*/
void save(); /* 保存链表为文件的函数覆盖以前的信息*/
void save1(); /* 保存链表为文件的函数不覆盖以前的信息只在创建时调用一次*/
struct tushu_node* wjtolb(); /* 从文件中读取数据并建立图书信息的链表的函数*/
int luruxinxi(); /* 录入学生信息的函数*/
struct tushu_node * luruxinxi_chuangjian(); /* 创建图书信息的函数*/
struct tushu_node * luruxinxi_charu(); /*插入图书信息的函数*/
struct tushu_node * luruxinxi_shanchu(); /*删除图书信息的函数*/
struct tushu_node * luruxinxi_xiugai(); /*修改图书信息的函数*/
int liulantushu(); /* 浏览图书信息的函数*/
int chaxuntushu(); /* 查询图书信息的函数*/
void chaxuntushu_num(); /* 按编号查询图书*/
void chaxuntushu_name(); /* 按书名查询图书*/
void chaxuntushu_price(); /* 按价格查询图书*/
void paixutushu(); /* 为图书排序的函数*/
struct tushu_node* paixutushu_price(); /* 为图书按价格排序的函数*/
struct tushu_node* paixutushu_time(); /* 为图书按出版时间排序的函数*/
void sfjx() ; /* 写个小函数,判断是否继续,让程序更完美在排序中使用*/
int tongjitushu_shumu(); /* 统计图书数目的函数*/
void shiyongshuoming(); /* 使用说明的函数*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
int main()
{
int chioce;
chioce=quanxian(); /*核查用户是否有使用该管理系统的权限的函数*/
if(chioce==1) /*若取得权限则返回值为1 */
{
system("cls");inputchioce();
}
exit(0);
}
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
int inputchioce() /* 主菜单*/
{
int mychioce,x=-1;
printf("\n++++++++++++++++++++++++++++++++++++++欢迎你++++++++++++++++++++++++++++++++++\n\n");
printf("**+++++++++++++++++++++++++++++++++++ 主菜单
+++++++++++++++++++++++++++++++**\n");