Pages

Saturday, 23 April 2016

Mini project "library management" in C programming

This is my college 1st  semester mini  project “library management “ in C programming language.This is console application without graphic and compiled in code::block with gcc compiler. I hope it will help you to develop your own project similar project related to file handling for example “Banking “,” customer  records”,”student records" etc.
I have divided my project into many function and I will describe each of them which may help you to understand better.


List of function and their discription are:-
void mainmenu(void); // This function is used to display main menu of project.
 void returnfunc(void); // To return back to main menu .Inside this function mainmenu function is called when user press enter key.
void addbooks(void); // To add books in a file.
void deletebooks(void); // To detete books from file.
void editbooks(void); // This function is used to edit book in library.
void searchbooks(void); // This function is used to search book in library.
void issuebooks(void); // This function is used to issue book in library.
void viewbooks(void); // This function is used to View books in library.
int  getdata(); // This function is used to take required  data input from user
int  checkid(int); // This function check Id of book entered by user does exist in file or not.
void Password(); // This function asked user to input password but this function doesn’t  give service to change password .We can’t change password ,it is fixed and password is “pokhara”.

Using like this function is not good so don’t use in your project.
void issuerecord(); // This function is used to keep record of student for whom book is issued.
void loaderanim();
void gotoxy (int x, int y) // This is most important function used to print text in any place of screen of our programme .We can use this function directly in turbo c but it doesn’t  work in code::block so we write code for this.
Below I have given code for gotoxy in code::block.

COORD coord = {0, 0};  // sets coordinates to 0,0 global variable
void gotoxy (int x, int y){
        coord.X = x; coord.Y = y; // X and Y coordinates
        SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
delay(unsigned int mseconds); // This function is used to delay our execution.This function works directly in turbo c but in code block we have to write code .
Source code for delay function in code::block is given below.
void delay(unsigned int mseconds){
    clock_t goal = mseconds + clock();
    while (goal > clock());
}
Instead of delay function you can use Sleep(int milisecond) function directly in code::block.It takes time in milisecode as argument to delay programme execution.


Download project: Download Library Management

No comments:

Post a Comment