请大家帮帮忙
看看我这程序哪有错误#include<iostream.h>
#include<string.h>
class base
{
private:
int num;
char name[10];
public:
base(int a,char n[]){num=a;strcpy(name,n);}
~base();
void show()
{
cout<<num<<" "<<name;
}
};
class book:public base
{
private:
char author[10];
public:
book(int a,char b[],char aut[]);
~book();
void show(){base::show();cout<<" "<<author<<endl;}
};
book::book(int a,char b[],char aut[]):base(a,b)
{
strcpy(author,aut);
}
class reader:public base
{
private:
int t;
book books[10];
public:
reader(int a,char n[]);
~reader();
void show();
void borrow(book &b);
};
reader::reader(int a,char n[]):base(a,n)
{
t=0;
}
void reader::show()
{
cout<<"reader: ";
base::show();
cout<<endl;
cout<<" borrow: "<<endl;
for(int i=0;i<t;i++)
{
cout<<" "<<i+1<<": ";
books[i].show();
}
}
void reader::borrow(book &b)
{
books[t]=b;
t++;
}
int main()
{
book b[]={book(1,"aaaaa","aaa"),
book(2,"bbbbb","bbb"),
book(3,"ccccc","ccc"),
book(4,"ddddd","ddd"),
book(5,"eeeee","eee")};
reader r[]={reader(1,"zhang"),
reader(2,"liu"),
reader(3,"wang")};
r[0].borrow(b[1]);
r[2].borrow(b[4]);
r[1].borrow(b[3]);
r[2].borrow(b[2]);
r[0].borrow(b[0]);
r[0].show();
r[1].show();
r[2].show();
return 0;
}