26 lines
513 B
C++
26 lines
513 B
C++
#include <iostream>
|
|
#include<iomanip>
|
|
#include"LinkList.h"
|
|
using namespace std;
|
|
|
|
|
|
bool isEmpty(bookList *l) {
|
|
if ((*l)->next == NULL) {
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
|
|
void display(bookList *l) {
|
|
if (isEmpty(l)) {
|
|
printf("List is empty\n");
|
|
} else {
|
|
bookNode *temp = (*l)->next;
|
|
while (temp != NULL) {
|
|
cout << temp->id << " " << temp->name << " " << fixed << setprecision(2) << temp->price << endl;
|
|
temp = temp->next;
|
|
}
|
|
}
|
|
}
|