fstream in; fstream out; in.open("d:\a.bmp", ios::in, ios::binary); out.open("d:\b.bmp", ios::out, ios::binary); char s[1024] = {}; printf(s); while (!in.eof()){ in.read(s, 1024); out.write(s, in.gcount()); } in.close(); out.close();
解决方案
20
in.open(“d:\a.bmp”, ios::in | ios::binary);
out.open(“d:\b.bmp”, ios::out | ios::binary);
注意是或不是逗号。
out.open(“d:\b.bmp”, ios::out | ios::binary);
注意是或不是逗号。