You made a typo when you copied it into your post.
Code:
//This part defines a class. anything after "public:"
//means that you can access those members
//outside of class instances by using the objects
//name followed by a dot followed by the
//encapsulated object's name
class Book
{
public:
string Title;
string Author;
string Publisher;
int ISBN;
string Editor;
float Cost;
Part* next;
Book(string, string, string, int, string, float, Book*); // Here was the typo. This is the constructor declaration
~Book(); //This is the destructor declaration
private:
};
//Here is the Book's constructor.
//When you create an object of type "Book"
//you have to specify the parameters in this
//function so that the object is initialized properly.
//The data after the single colon is the initializer list,
//which individually initializes each object with the
//information the user passes when he constructs a Book
Book::Book(string tempTitle, string tempAuthor, string tempPublisher, int tempISBN, string tempEditor, float tempCost, Part* tempNext)
: Title(tempTitle), Author(tempAuthor),
Publisher(tempPublisher), ISBN(tempISBN),
Editor(tempEditor), Cost(tempCost), next(tempNext)
{
}
//This is the Book's destructor.
//Right now, it doesn't do anything.
//If the book were in charge of dynamically
//allocating something to be stored within
//the object, then the destructor would
//be in charge of deallocating the memory
Book::~Book()
{
}
typedef Book* BookPtr; //This says that whenever you use
//the word BookPtr it represents
//the pointer to Book datatype
If you need more help, refer to this post.