Posts

Showing posts from April 23, 2018

LIBRARY MANAGEMENT SYSTEM USING SINGLY LINK LIST

#include <iostream> #include <ctime> #include <fstream> #include <string> #include <ctime> using namespace std; string BookName,StdName; int countBook=0,countissuebook=0; //structure of book struct Book { string name; Book*next= NULL; }*head=NULL; //structure of issuing  book struct issuebook{ string stdname;     string bookname;     string issuedate;     string duedate;     int no_of_book_issued_to_student;     issuebook *next;  }*head1=NULL; //insert a book bool insertbook(string Name,char* time) { bool flag=false; ofstream myfile("books.txt",ofstream::out | ofstream::app); Book *newBook= new Book; Book *temp; countBook++; newBook->name =Name; newBook->next=NULL; if(head==NULL) { head=newBook; flag=true; } else { temp=head; while(temp->next!=NULL) { temp=temp->next; } temp->next=newBook; flag=true; ...