Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- LinkedList myList;
- ifstream myFile("booklist.txt");
- string title;
- string author;
- Date published;
- string publisher;
- float price;
- string isbn;
- unsigned int pages;
- unsigned int copies;
- while( myFile ){
- getline(myFile,title);
- getline(myFile, author);
- myFile >> published._day >> published._month >> published._year;
- myFile >> publisher;
- myFile >> price;
- myFile >> isbn;
- myFile >> pages;
- myFile >> copies;
- myList.insert_rear( new Book(title, author, published, publisher,
- price, isbn, pages, copies));
- }
- myList.print_list();
- return 0;
- }
Add Comment
Please, Sign In to add comment