小型图书馆管理系统(C语言实现)

全部实现代码如下:
--------------------------------------------------------------------------------------
main.cpp

#include "c1.h"
typedef int ElemType;
#include "c2-5.h"
#include "c4-2.h"
#include "algo4-3.h"
#include "first.h"

void first_main() 
{
    FILE *fp_book,*fp_reader;
    if((fp_book=fopen("Book.txt","r+"))==NULL && (fp_reader=fopen("Reader.txt","r+"))==NULL)
    {
        about();    
        Init();
    }
    else
    {   Load();
        printf("\t读者及图书信息加载完毕。\n");

        //algo43_main();
        printf("\t关键词检索表更新完毕。\n");
    }

    Menu_select();
}//end"first_main()"


int main(void)
{
    first_main();
   
    return 0;
}
-----------------------------------------------------------------------------------------------
first.h

#ifndef FIRSTH1
#define FIRSTH1

// #include  
// #include
// #include
#include
#define Max 3     

typedef struct book   
{
    char book_num[10];
    char book_name[20];
    int  book_kc;     //MY库存总量
    int  book_xc;    //MY现存数量
    struct book *next;
}BK;

typedef struct Start
{
    int st_sec;
    int st_hour;
    int st_mday;
    int st_min;
    int st_mon;
    int st_year;
}start;

typedef struct borrow  
{
    char borrow_book_num[10];
    start lend_t;
}BO;

typedef struct reader       
{
    char reader_num[10];
    char reader_name[10];
    int right;     //MY读者最多借书本数
    BO borrow[Max]; 
    struct reader * next;
}RD;
//BK *h_book;       
//RD *h_reader;     

int Menu();               
void Menu_select();       
void Init();              
void Init_reader();      
void Init_book();        
void Insert_New_Book();   
void Insert_New_Reader(); 
void del_old_book();      
void del_old_reader();    
void book_not_enough();   
int Find();               
void Find_Select();    

你可能感兴趣的:(C)