设计一个图书信息管理系统,每本图书包含ISBN号、书名、定价信息,
要求实现取值、查找、插入、删除等功能
#include <cstring>
#include <iostream>
#include <stdlib.h>
#define ok 1
#define error 0
#define overflow -2
#define MaxSize 100
using namespace std;
typedef int status;
//定义
typedef struct{
int bookid; //编号
char bookname[50]; //书名
float bookprice;
}book;
typedef struct
{
book *elem;
int length;
}bookSqList;
//函数声明
status InitList(bookSqList &L);
status CreateList(bookSqList &L);
status GetElem(bookSqList L, int i, book &e);
int LocateElem(bookSqList L, book e);
status ListInsert(bookSqList &L, int i, book e);
status ListDelete(bookSqList &L, int i);
int DispList(bookSqList L);
status DestoryList(bookSqList &L);
//菜单
void menu()
{
cout << "******************************************" << endl;
cout << "*** 欢迎进入图书资料管理系统 ***" << endl;
cout << "
顺序表实现图书信息管理系统
最新推荐文章于 2024-07-19 17:08:05 发布