{ofstream outtemp1("temp1.txt",ios::out);ofstream outData("temp.txt",ios::out);ifstream indata("Personal system of accounting.txt",ios::in);if outData || indata) { cout

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/24 02:14:35
{ofstreamouttemp1("temp1.txt",ios::out);ofstreamoutData("temp.txt",ios::out);ifstreamindata("Persona

{ofstream outtemp1("temp1.txt",ios::out);ofstream outData("temp.txt",ios::out);ifstream indata("Personal system of accounting.txt",ios::in);if outData || indata) { cout
{
ofstream outtemp1("temp1.txt",ios::out);
ofstream outData("temp.txt",ios::out);
ifstream indata("Personal system of accounting.txt",ios::in);
if outData || indata)
{
cout

{ofstream outtemp1("temp1.txt",ios::out);ofstream outData("temp.txt",ios::out);ifstream indata("Personal system of accounting.txt",ios::in);if outData || indata) { cout
ofstream outtemp1("temp1.txt",ios::out);//定义一个输出流对象outtemp1,就是可以向temp1.txt这个文件写数据
ofstream outData("temp.txt",ios::out);//定义一个输出流对象outData,就是可以向temp.txt这个文件写数据
ifstream indata("Personal system of accounting.txt",ios::in);//定义一个输入流对象 indata,可以从
Personal system of accounting.txt这个文件中取出数据
if (!outData || !indata) //通过判断文件流对象的返回值判断文件是否存在.这里少了一个"||!outtemp1"
{
cout