基于链式存储结构的图书信息表的旧图书的出库
#include<stdio.h>
#include<stdlib.h>
#include<iostream>
//#pragma warning(disable:)
using namespace std;
struct information {
char booknum[20];
char bookname[20];
float price = 0.0f;
};
typedef struct LNode {
information data;
LNode *next;
}*Linklist;
void Create(Linklist &L, int *num) {
L = new LNode;
Linklist p, r;
p = new LNode;
L->next = p;
cout << "请输入图书信息" << endl;
while (1) {
cin >> p->data.booknum >> p->data.bookname >> p->data.price;
if (p->data.booknum == 0 || p->data.bookname == 0 || p->data.price == 0) {
break;
}
r = p;
p = new LNode;
r->next = p;
(*num)++;
}
p->next = NULL;
}
int Comeout(Linklist &L, int *num, int *place) {
Linklist p, u,fore=new LNode;
p = L;
if (*place > *num || *place <= 0) {