Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include "Library.h"
  4.  
  5. using namespace std;
  6.  
  7. int main() {
  8. // we need a library...
  9. Library* myLibrary = new Library();
  10.  
  11. // this is for creating a new book
  12. string a = "Hogwarts";
  13. string b = "JK";
  14. string c = "fantasy";
  15. string d = "1234";
  16.  
  17. Book* mybook = new Book(a,b,c,d);
  18.  
  19. cout << (*mybook).isbn << endl;
  20.  
  21. // we've created the book, and the library, let's insert the book
  22. myLibrary->insertBook("1234", *mybook);
  23. cout << myLibrary->getAvailableBooks() << endl;
  24. myLibrary->printLibrary();
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement