小编Sco*_*ous的帖子

我无法复制整个二进制文件

    ifstream ifile("/home/zuma/xps.mp3", ios::binary | ios::in);
    ofstream ofile("/home/zuma/xxx.mp3", ios::binary | ios::out);

    copy(istream_iterator<unsigned char>(ifile), istream_iterator<unsigned char>(), ostream_iterator<unsigned char>(ofile));

    ifile.close();
    ofile.close();
Run Code Online (Sandbox Code Playgroud)

创建的新文件比原始文件的字节数少,文件不匹配

c++ binary stl copy file

2
推荐指数
1
解决办法
288
查看次数

标签 统计

binary ×1

c++ ×1

copy ×1

file ×1

stl ×1