#include <string.h>
class BookCard
{
public:
char m_sBookName[20];
public:
void regist(char * bookName);
void showMe();
};
static int bkcCount=0;
BookCard bkcList[1000];
void BookCard::regist(char * bookname)
{
strcpy(bkcList[0].m_sBookName,bookname);
}
void BookCard::showMe()
{for(int j(0);j<bkcCount;j++)
cout<<" 书名: "<<bkcList[j].m_sBookName<<endl;;
}
void main()
{
char service[80];
char bookname[80];
do
{
cout<<" br: 注册新书"<<endl;
cin>>service;
cin>>bookname;
bkcList[bkcCount].regist(bookname);
cout<<"你所登记的新书为:"<<endl;
bkcList[bkcCount].showMe();
bkcCount++;
}while(strcmp(service,"exit")!=0);
}