You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
433 B

#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();
}