以下代码将 Hello 写入文件 data.txt 。 ofstream file("data.txt"); cout<<"Hello"<< endl; file.close(); 正确答案:错误(×)