This is what my debugger says, but I can't find the problem.
Holding.h:15: warning: `class Holding' has virtual functions but non-virtual destructor
In file included from p6.cpp:12:
Recording.h:13: warning: `class Book::Recording' has virtual functions but non-virtual destructor
p6.cpp:90: error: expected `}' at end of input
Book.h:14: warning: `class Book' has virtual functions but non-virtual destructor
p6.cpp: In member function `int Book::main()':
p6.cpp:90: warning: no return statement in function returning non-void
p6.cpp: At global scope:
p6.cpp:90: error: expected unqualified-id at end of input
make: *** [p6.o] Error 1
#include <iostream>
#include <string>
#include "Holding.h"
#include "Book.h"
#include "Recording.h"
int main() {
int C=0, D=1;
int count=0, i=0;
char selection, choice;
string title, name, callnum;
Holding *holding[5];
cout<<"Enter holdings to be stored in a list:"<<endl <<endl;
while(count != 5){
cout << "Enter B for book, R for recording: ";
cin >> selection;
switch(selection){
case 'B':
cout<<"Enter book title: ";
cin >> title;
cout<<"Enter book author: ";
cin>> name;
cout<<"Enter call number: ";
cin >> callnum;
Book *book = new Book(title, name, callnum);
holding[count] = book;
count++;
break;
case 'R':
cout<<"Enter recording title: ";
cin >> title;
cout<<"Enter performer: ";
cin>> name;
cout<<"Enter format: (L)P, (C)assette, (R)eel_to_reel, (D)isk: ";
cin >> choice;
switch(choice){
case 'C':
cout<<"Enter call number: ";
cin>>callnum;
Recording *rec = new Recording(title, name, callnum, C);
holding[count]=rec;
count++;
break;
case 'D':
cout<<"Enter call number: ";
cin>>callnum;
Recording *rec2 = new Recording(title, name, callnum, D);
holding[count]=rec2;
count++;
break;
//case 'L':
//print LP;
//break;
//case 'R':
//print Reel
//break;
default:
cout<<"Error: Enter a valid selection"<<endl;
break;
}//end inner switch
break;
default:
cout<<"Error: Enter a valid selection"<<endl;
break;
}//end outter switch
}//end while
cout<<endl;
cout<<"Here are the holdings: "<<endl <<endl;
for(i=0; i < 5; i++){
holding[i]->print();
}
}