02 2025 档案

摘要:情况一:文件不存在 使用 is_open() 函数,如果成功打开返回true,打开失败返回false ifstream infile; infile.open(FILENAME, ios::in); //文件不存在 if (!infile.is_open()) { cout << "文件不存在" < 阅读全文
posted @ 2025-02-27 21:47 Chano_sb 阅读(2) 评论(0) 推荐(0) 编辑