C++ 读取大文件函数
void copyfile()
{
char f_buf[1024] = { 0 };
ifstream infile("H:\Temp\cmd.exe", ios::in | ios::binary);
ofstream outfile("H:\getfile\cmd.exe", ios::app | ios::binary);
if (!infile)
{
}
while (!infile.eof())
{
infile.read(f_buf, sizeof(f_buf));
outfile.write(f_buf, sizeof(f_buf));
}
infile.close();
outfile.close();
cout << "去看看有没有文件" << endl;
}声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。
- 上一篇:没有了
- 下一篇:没有了
