资源简介

C语言实现的图书管理系统,带文件存盘功能 可实现学生信息和图书信息分开管理

资源截图

代码片段和文件信息

#include“stdio.h“
#include“stdlib.h“
#include“malloc.h“
#include“iostream“
#include“string“
#include 
using namespace std;
#define NULL 0
#define LENB sizeof(struct  book)//图书结构体的大小
#define LENS sizeof(struct student)//学生结构体的大小
int n=0;//库存图书数量
int m=0;//学生数量
struct book
{
       char bookname[200];//书名
   char writername[200];//作者名
   char Publish[200];//出版社
   int sum;//库存数量
   int num;//书号
   struct book *next;
};
struct student
{

long int number;//学生学号
char name[20];//学生姓名
int sum;//在借图书数量,最大为10本
int borrow[10];//在借图书书号
int year[10]month[10]day[10];//在借图书借书时间
    struct student *next;

};


struct book set_bookname()//输入书名、作者名、出版社名和书号
{
int i;
struct book book1;
char ch;
     cout<<“请输入书名:“<  getchar();
 for(

评论

共有 条评论