问题描述:
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 char* source,const char* dest);
Note that the file might be very large,and the content of the file can be text,image,video,audio,and so on.Try to copy the file as quick as possible.
There may be some different exceptions and errors during copy operation,such as null value parameters,file doesn't exist,file stream reads or writes error,and so on.Return an error code to specify which kind of error occurs during copy.
int copyfile(const char* source,const char* dest);
Note that the file might be very large,and the content of the file can be text,image,video,audio,and so on.Try to copy the file as quick as possible.
There may be some different exceptions and errors during copy operation,such as null value parameters,file doesn't exist,file stream reads or writes error,and so on.Return an error code to specify which kind of error occurs during copy.
问题解答:
我来补答展开全文阅读