Hey guys I need some help with an assignment I'm working on. It tells me to write classes for Author, Publisher, and Book. An Author and Publisher object has to be added to Book. I've written the Author and Publisher classes, and I'm working on Book before I start main, but I have some problems.
(my Book.cpp file isn't completed yet)
1. The strings are underlined with the error "string" is ambiguous in the cpp.
2. I'm asked to make an Author and Publisher object a private variable in Book.
I then have to make a constructor that takes a title, author, and publisher parameter. My constructor in the header isn't working, and I'm not sure why.
3. Part of the instructions for the Book class requires me to initialize the Author and Publisher objects. I don't think I'm doing it right, but I added a friend function for each of them included in my code. Is that how I should do that, and, if so, did I do it right?
The order for the code below:
Book.h
Book.cpp
Author.h
Author.cpp
Publisher.h
Publisher.cpp