I have the following code
Code:
)
string line = (*aIt), line1, path;
bool res;
string::size_type i;
i = line.find_last_of('\\');
line1 = line.substr(0, i);
i = line1.find_last_of('\\');
line = line1.substr(i + 1, (line.length() - i));
path = file + "\\" + line;
res = CopyFile((LPCTSTR)line1.c_str(), (LPCTSTR)path.c_str(), ifExists);
cout << "\n" << GetLastError() << endl;
}
}//else
