Write a function which copies one file to another.

发布时间:2021-02-20 22:46:23

Write a function which copies one file to another.Have the function throw a file not exist exception if it cannot open the specified file.The function have the following prototype:int copyfile(const c

网友回答

在下人工翻的,望有所用~(ps 你是要参加什么编程大赛吗?)
写一个能够复制一份文件到另一份文件的函数(程序).确保这个函数能够投递一份并不存在的文件除非它不能够打开某份特定的文件.这个函数具有以下原型:int copyfile(const char* source,const char* dest);
注意,文件可能会非常大,文件的目录可以被文本化,影像化,视频化,音频化等等.能够尽快的拷贝文件.
当拷贝操作进行时可能会有一些例外和错误,比如无效的量值参数,文件不存在,文件流读写错误,等等.回报一个错误代码以便弄清在拷贝进行中发生的错误种类.
以上问题属网友观点,不代表本站立场,仅供参考!