{
ifstream infile("BOOK.dat",ios::binary);
if(!infile)
{
cout<<"\n\t\t !!!对不起,没有找到数据文件,无法导入数据.";
return;
}
CNode*pNode;
CTelRecord*pTel;
while(!infile.eof())
{
pTel=new CTelRecord;
infile.read((char *)pTel,sizeof(CTelRecord));
pNode=new CNode;
pNode->InputData(pTel);
TelList.AddNode(pNode);
}
TelList.DeleteNode(pNode);
infile.close();
}
void TongJi(CList &TelList)
{ system("cls");
int a,b,i,j,k, d,e,f,g,m,n;
CTelRecord sk("0","0","社科","0");
CTelRecord zk("0","0","自科","0");
CTelRecord wx("0","0","文学","0");
CTelRecord gj("0","0","工具书","0");
CTelRecord qt("0","0","其他","0");
a=TelList.tongji(sk);
b=TelList.tongji(zk);
i=TelList.tongji(wx);
j=TelList.tongji(gj);
k=TelList.tongji(qt);
cout<<'\t'<<"↑"<<endl;
for(d=20;d>0;d--)cout<<d+50<<'\t'<<"│"<<endl;
for(d=50,e=50,f=50,g=50,m=50,n=50;e>0;d--,e--,f--,g--,m--,n--)
{ cout<<d<<'\t'<<"│";
if(e>a)cout<<" ";else cout<<"■";
cout<<'\t';
if(f>b)cout<<" ";else cout<<"■";
cout<<'\t';
if(g>i)cout<<" ";else cout<<"■";
cout<<'\t';
if(m>j)cout<<" ";else cout<<"■";
cout<<'\t';
if(n>k)cout<<" ";else cout<<"■";
cout<<endl;
}
cout<<" ————————————————————————→"<<endl;
cout<<'\t'<<a<<" "<<'\t'<<b<<" "<<'\t'<<i<<" "<<'\t'<<j<<" "<<'\t'<<k<<" "<<endl;
cout<<" "<<"社科"<<" "<<"自科"<<" "<<"文学"<<" "<<"工具书"<<" "<<"其他"<<endl;
}
int main()
{
CList TelList;
system("cls");
cout<<endl<<"\t\t\t☆☆☆ 欢迎进入图书管理系统☆☆☆\n";
LoadFile(TelList);
string strChoice;
do
上一页 [1] [2] [3] [4] [5] [6] 下一页