身首异处
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user