Should I create two CFile objects and copy one into the other character by character? Or is there something in the library that will do this for me?
views:
2373answers:
2
+6
A:
I would just use the CopyFile Win32 API function, but the example code in the CFile::Open documentation shows how to copy files with CFile (using pretty much the method you suggest).
jeffm
2008-10-10 15:52:21
+1Don't forget that MFC is just a Win32 wrapper. When doing simple, low-level actions it's often most efficient to call the API directly.
Aidan Ryan
2008-10-10 22:13:51
+1
A:
It depends on what you want to do. There are a number of ways to copy files:
- CopyFile()
- CopyFileEx()
- SHFileOperation()
- IFileOperation (replaces SHFileOperation() in Vista)
skst
2008-10-14 05:07:11