#include <iostream>
#include <fstream>
usingnamespace std;
void copy(char* src, char* dest)
{
FILE *source = fopen(src, "rb");
FILE *destination = fopen(dest, "wb");
unsignedchar buf[1000];
int i;
do
{
i = fread(buf, 1, 1000, source);
fwrite(buf, 1, i, destination);
} while (i == 1000);
fclose(source);
fclose(destination);
}
int main()
{
copy("E:/input.txt", "E:/output.txt");
}
When I compiled, the compiler said: no instance of overloaded function "copy" matches the argument list and 'void copy(char *,char *)': cannot convert argument 1 from 'const char [13]' to 'char *'
What did I go wrong?