Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize the C++ Book Management system

Shulou Source: shulou.com Published: 2022-06-01 06:06:59 10月04日 Update

This article mainly introduces how to achieve the C++ version of the book management system, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to know about it.

The details are as follows

Introduction to use

The source code of the library management system consists of two parts, the first part is the book.h header file and the second part is the book.cpp source file. When you need to pay attention to the source code of the book.h file in a separate file, the file name must be book.h. The source files also need to be placed in a separate .cpp file.

Book.h header file

# include#include#include#includeusing namespace std;// member class class VIP {public: int vnum; / / member number string name; / / member name int num; / / Book number string bookName; / / title string author; / / author string press; / / Publishing House VIP * next; / / pointer}; / / Book node class class Node {public: int num / / Book number string bookName; / / title string author; / author string press; / / Publishing Node * next; / / pointer}; VIP vip [100]; Node book [100]; void add (); / / add book function void Output (Node p); / / output book information function int LookupBook (); / / find void LookupAuthor by book title () / / find int LookupNum () by author's name; / / find void LookupPress () by number; / find void addVIP () by publishing house; / / add membership function void OutputVIP (VIP s); / / output member information function int LookupNumVIP (); / / query member void LookupNameVIP () by number; / / find member void DeleteVIPbook by member name () / / Delete the member borrowing information void Delete (); / / delete the member function void Query (); / / query the borrowing information void Return () according to the member number; / / return function void Borrow (); / / Book lending function void Index (); / / Home void BookInterface (); / / Library Management interface void VIPInterface () / / member management interface void DeleteBook (); / delete the book function void LookupBookIn (); / / Book query page void LookupVIPIn (); / / member query page

Book.cpp source file

# include "book.h" int main () {Index (); / / homepage function return 0;} / / add the book function void add () {for (int item0)

Tags: Books members functions queries management information management systems systems titles authors publishers publications documents home pages success names interfaces pages input member management Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi vpn Apple Shulou Technology macOS