下面程序能够把 Hello 写入 data.txt 文件中。
ofstream fout("data.txt"); cout << "Hello"; fout.close();
复制链接后可在微信、QQ、小红书等平台粘贴分享;答案与解析在题目页。