项目说明

本系统基于C语言开发,适用于刚入门的C语言新手项目课设,开发软件采用VC++6.0开发,VS,DEV C++等均可运行。

项目运行截图

 

 

 

 

 

 

 

 

 代码界面截图

 部分关键代码:

int search_history(char no[],char issn[],struct History **history_p1,struct History **history_p2)//p1为前一个指针,p2是待查项指针

{

int flag=0;//标记找没找到,初始值0

*history_p1=*history_p2=history_head;

if(strcmp(issn,"ALL")==0)

{

while(*history_p2!=NULL)

{

if((strcmp(no,(*history_p2)->no)==0))

{

flag=1;

printf("学号:%s issn编号:%s\n借书日期:%d/%d/%d\n还书日期:%d/%d/%d\n违约金:%lf\n",

(*history_p2)->no,(*history_p2)->issn,

(*history_p2)->borrow_date.year,(*history_p2)->borrow_date.month,(*history_p2)->borrow_date.day,

(*history_p2)->return_date.year,(*history_p2)->return_date.month,(*history_p2)->return_date.day,

(*history_p2)->penalty);

puts("**********************");

}

*history_p1=*history_p2;

*history_p2=(*history_p1)->next;

}

puts("**********************");

system("pause");

}

else

{

while(*history_p2!=NULL)

{

if(strcmp(no,(*history_p2)->no)==0&&strcmp(issn,(*history_p2)->issn)==0&&(*history_p2)->return_date.year==0)//学号找到,书号找到,且没有还书

{

flag=1;

break;//找到,跳出

}

*history_p1=*history_p2;

*history_p2=(*history_p1)->next;

}

if(flag)//找到了

{

puts("找到此记录");

printf("学号:%s issn编号:%s\n借书日期:%d/%d/%d\n还书日期:%d/%d/%d\n违约金:%lf\n",

(*history_p2)->no,(*history_p2)->issn,

(*history_p2)->borrow_date.year,(*history_p2)->borrow_date.month,(*history_p2)->borrow_date.day,

(*history_p2)->return_date.year,(*history_p2)->return_date.month,(*history_p2)->return_date.day,

(*history_p2)->penalty);

}

else

puts("无此记录!!!");

system("pause");

}

return flag;

}

获取完整源码:

链接:https://pan.baidu/s/1rtA4PiGJ5ns-glCSgCcBsA 
提取码:rsxt

更多推荐

C语言图书管理系统课设