parent
545b2886e6
commit
d44fdd94e9
@ -0,0 +1,20 @@
|
|||||||
|
#include<iostream>
|
||||||
|
#include<string>
|
||||||
|
#include<fstream>
|
||||||
|
#include"book.h"
|
||||||
|
#include"library.h"
|
||||||
|
using std::cout;
|
||||||
|
using std::cin;
|
||||||
|
using std::endl;
|
||||||
|
extern Book booklist[50];
|
||||||
|
extern int num;
|
||||||
|
void wxy::daochu()
|
||||||
|
{
|
||||||
|
std::ofstream ofile("booklist.txt");
|
||||||
|
ofile << num << '\n';
|
||||||
|
for (int i = 0; i < num; i++)
|
||||||
|
{
|
||||||
|
ofile << booklist[i].Name << ' ' << booklist[i].Auther << ' ' << booklist[i].amount << '\n';
|
||||||
|
}
|
||||||
|
ofile.close();
|
||||||
|
}
|
Loading…
Reference in new issue