我试图通过SHFileOperationA
函数复制文件夹。这是我的代码。
int main() {
SHFILEOPSTRUCTA sf;
int result;
string source = "D:\check\folder4";
string dest = "D:\Documents\test\folder4";
sf.pFrom = source.c_str( );
sf.pTo = dest.c_str( );
sf.wFunc = FO_COPY;
sf.fFlags = FOF_NOCONFIRMATION | FOF_NOCONFIRMMKDIR | FOF_SILENT;
result = SHFileOperationA(&sf);
return 0;
}
我不能够理解,如何使字符串由