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