下面 C++ 代码实现将 Hello 写入 data.txt。
Hello
data.txt
ofstream out("data.txt"); out << "Hello"; out.close();
正确 √
错误 ×