测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A18374. 假设文件 output.txt 能正常打开,下面代码通过 rdbuf 将 cout 的输出重定向到了文件中。ofstream fout("output.txt"); streambuf* old_buf = cout.rdbuf(); cout.rdbuf(fout.rdbuf()); cout << "GESP Exam"; cout.rdbuf(old_buf);

判断题 较难

题目描述

假设文件 output.txt 能正常打开,下面代码通过 rdbuf 将 cout 的输出重定向到了文件中。

ofstream fout("output.txt");
streambuf* old_buf = cout.rdbuf();
cout.rdbuf(fout.rdbuf());
cout << "GESP Exam";
cout.rdbuf(old_buf);

选项(单选)

上一题 下一题