身首异处

This commit is contained in:
2024-10-19 00:04:17 +08:00
parent 10b6e6aa67
commit 39819cdf5e
4 changed files with 32 additions and 16 deletions
+4 -8
View File
@@ -1,23 +1,19 @@
#include <iostream>
#include<iomanip>
#include"LinkList.h"
using namespace std;
typedef struct bookNode {
string id;
string name;
double price;
bookNode *next;
} book_node, *bookList;
bool is_list_empty(bookList *l) {
bool isEmpty(bookList *l) {
if ((*l)->next == NULL) {
return true;
}
return false;
}
void display(bookList *l) {
if (is_list_empty(l)) {
if (isEmpty(l)) {
printf("List is empty\n");
} else {
bookNode *temp = (*l)->next;