求解为何D盘多了一个乱码txt文件?????
#include <iostream>#include <fstream>
using namespace std;
int main() {
ofstream fout("d:test.txt");
fout << "hello world!";
fout.close();
fout.open("d:test.txt", ios::in|ios::out);
fout.seekp(1, ios::end);
fout << "123";
fout.close();
return 0;
}
为何是乱码呢????好像去掉hello world!中的“!”就正常了为什么啊?!