Library Management System

Library Management System

Hello I am developing program of library management system where I need to use C++ but without class. So I am facing problem at two place, One is when there are no books information at that time it should show No books found and the other is while searching the books through ISBN number. Both the things are not happening. So please anyone try to solve it...

#include<stdio.h>
#include<conio.h>
#include<iostream.h>
struct library
{
char isbn[10],b_name[15],a_name[15],search[10];
}stud[100];
void main()
{
int i,j,a,flag=0;
char op,b;
do
{
    clrscr();
    cout<<"Press 1 to input information"<<endl;
    cout<<"Press 2 to display book information"<<endl;
    cout<<"Press 3 to search for book"<<endl;
    cout<<"Press 4 to exit"<<endl;
    cin>>a;
    switch(a)
    {
    case 1:
        {
        clrscr();
        cout<<"How many records do you want to enter: \t";
        cin>>j;
        clrscr();
        for(i=0;i<j;i++)
            {
            cout<<"Enter Record: "<<i+1<<endl;
            cout<<"Enter ISBN Number: \t";
            cin>>stud[i].isbn;
            cout<<"Enter Book Name: \t";
            cin>>stud[i].b_name;
            cout<<"Enter Author Name: \t";
            cin>>stud[i].a_name;
            }
         break;
        }
    case 2:
        {
         clrscr();
         cout<<"----------------------------------------------------------------------------"<<endl;
         cout<<"ISBN Number\t\t\tBook Name\t\t\tAuthor Name"<<endl;
         cout<<"----------------------------------------------------------------------------"<<endl;



>  if(stud[0].isbn==" ")
>            {
>             cout<<"No Recods found";
>            }

             else
         {
         for(i=0;i<j;i++)
            {
             cout<<stud[i].isbn<<"\t\t\t\t"<<stud[i].b_name<<"\t\t\t\t"<<stud[i].a_name<<endl;
            }
         }
         break;
        }
    case 3:
        {
        cout<<"Enter ISBN number that you want to search";
        cin>>stud[0].search;
        cout<<"----------------------------------------------------------------------------"<<endl;
        cout<<"ISBN Number\t\t\tBook Name\t\t\tAuthor Name"<<endl;
        cout<<"----------------------------------------------------------------------------"<<endl;
         for(i=0;i<j;i++)
            {


>  if(stud[i].isbn==stud[0].search)
>            {
>            cout<<stud[i].isbn<<"\t\t\t"<<stud[i].b_name<<"\t\t\t"<<stud[i].a_name<<endl;
>            flag = 1;

             }
            }
             if(flag==0)
             cout<<"Sorry No Reords found"<<endl;
            // cout<<"Real"<<stud[i].isbn<<"Search"<<stud[0].isbn;
        break;
        }
    case 4:
        {

        }
    }
cout<<"Do you want to continue: ";
cin>>op;
}while(op=='Y'||op=='y');
getch();
}
View Answers

Ads









Related Tutorials/Questions & Answers:
library management system
library management system  coding for library management system
Library Management System
Library Management System  Hello I am developing program of library management system where I need to use C++ but without class. So I am facing...; struct library { char isbn[10],b_name[15],a_name[15],search[10]; }stud[100
Advertisements
library management system jsp project
library management system jsp project  i need a project of library management system using jsp/java bean
library management system jsp project
library management system jsp project  i need a project of library management system using jsp/java bean
library management system jsp project
library management system jsp project  i need a project of library management system using jsp/java bean
library management
library management   i need java script code for library management system with html
library management
library management   i need java script code for library management system with html
library management
library management   i need java script code for library management system with html
library management
library management   i need java script code for library management system with html
library system
library system  hi to all..please help me how to make a library system using a java program..please response me
library system
library system  hi to all..please help me how to make a library system using a java program..please response me
for management system
for management system  i need to store some data and to display the stored data and again to modify the data that have been stored and also with either java swing or java awt in format of similar to tat of form
coding for employee management system
coding for employee management system  coding for employee management system
Employee Management System
Employee Management System  coding for employee management system
Employee Management System
Employee Management System  coding for employee management system
attendance management system
attendance management system  i want to project demo on attendance management system
Bank Management System
Bank Management System  I need a Bank Management System Project in Java Swing
Attendence Management system
Attendence Management system  coding for Attendance management system using java applet
generic workflow management system
generic workflow management system  How to design a generic workflow system for applying scholarship and its processes in online
generic workflow management system
generic workflow management system  How to design a generic workflow system for applying scholarship and its processes in online
contact and activity management system
contact and activity management system  how to make a web application on contact and activity management system. can anyone help me
Pharmacy Management System
Pharmacy Management System  hi all i wanna Pharmacy management system in java or vb.net or web application >> << thx all
material management system
material management system  hi frnds i need a mini project based on material management system if u have the project please post to me on java beginners
Complaint Management System
Complaint Management System  Hi......i have to create a complaint management system where the user calls a toll free number and a computerized voice... with the complaint number. I have no idea as to how I should go about this system
Fleek Management System(FMS)
Fleek Management System(FMS)  Hi, Please anybody can reply....I wanna develop a project(FMS) in Java , which was already developed in PHP. Now what technologies should i apply for developing this project. The main aim
STUDENT MANAGEMENT SYSTEM
STUDENT MANAGEMENT SYSTEM  can any one help me with the coding if this using awt please!!!!!!! STUDENT MANAGEMENT SYSTEM Table details Student (STUDENTID, NAME, ADDRESS, PHONE, MAILID, COURSEID (Foreign Key)) Course (COURSEID
Hostel management information system
Hostel management information system  Can u send me mvc based project of hostel management systenm source code
Student Management System
Student Management System  Hi , Friend can i get the solution for connecting login page of JFrames to JDBC
resume management system
resume management system  hey coders im making an web application for managing resumes.. the application should be able to manage all incoming resumes and information from the client.. m using java as the front end and oracle
Java Hospital management system
Java Hospital management system  hospital management    <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page import="java.sql.*" %> <!DOCTYPE html> <html> <body>
library management project
library management project  Is there any similiar methods to that of sendredirect in java

Ads