Files
data-structures-and-algorithms/homework2/Test_LinkList.cpp
T
2024-10-18 23:54:54 +08:00

24 lines
517 B
C++

#include <iostream>
#include "LinkLits.cpp"
using namespace std;
void insert(bookList *l) {
bookNode *temp = (*l)->next;
while (temp != NULL) {
cin >> (*temp).id >> (*temp).name >> (*temp).price;
if (!(((*temp).id == "" && (*temp).name == "" && (*temp).price == 0))) {
temp = (*temp).next;
} else {
temp = NULL;
}
}
}
int main() {
bookList books = new bookNode;
books->next = NULL;
insert(&books);
display(&books);
return 0;
}