#include <iostream>
#include <fstream>
#include <string>
using namespace std;
// 简单的文件读写示例
void createBookFile(const string& bookName) {
// 创建文件
ofstream file(bookName + ".txt");
// 给文件中写入数据
file << "Book Name: " << bookName << endl;
// 关闭文件流
file.close();
}
int main() {
string bookName;
cout << "Enter book name: ";
cin >> bookName;
createBookFile(bookName);
cout << "Book file created successfully." << endl;
return 0;
}