I am wrking on a project in wch I hve to copy some files from one place to another.
This is wat I do.
struct dirent *ent;
if ((dir = opendir(path1)) != NULL)
while ((ent = readdir(dir)) != NULL)
a1 = path1;
a2 = path2;
name = ent->d_name;
CopyFileA(a1, a2, 0);
No error, but it exception is thrown like
An unhandled exception of type 'System.AccessViolationException' occurred in .........
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Thanks in advance