Code:
Book a;
...
lib.cpp: In function `int main()':
lib.cpp:103: error: no matching function for call to `Book::Book()'
lib.cpp:21: error: candidates are: Book::Book(const Book&)
lib.cpp:44: error: Book::Book(char*, int, int)
You haven't supplied a default constructor for your class which is required in order to get the above bit of code to compile. If you don't want a default constructor, you must supply the necessary arguments when you construct an object of this type.
Code:
Book a("Grapes of Wrath",20,20);
Also...
Code:
Book::Book(char *b, int i, int c):BookName(b),BookId(i),numCopies(c),copiesAvail( c){}
This is wrong, you can't assign a character pointer to an array. You need to use strcpy.
Code:
Book::Book(char *b, int i, int c):BookId(i),numCopies(c),copiesAvail( c)
{
strcpy(BookName,b);
}
Or better yet, use a string container instead of a character array and then you can use your original syntax.
[edit]Beaten... drat![/edit]