To copy a file you basically need to first read that file. To do this read about opening ifstreams as binary files (
http://www.cplusplus.com/reference/i...ream/read.html ), might want to edit that code a bit. Then you'll want to save the contents of what you read to an output file, ofstream is your weapon of choice here (
http://www.cplusplus.com/reference/i...eam/write.html )... In fact the latter link has basically your program... Write some user-input/command line parameter processing around it to allow a user to select the input and output files and hey presto done.
Reputation Points: 453
Solved Threads: 57
Posting Virtuoso
Offline 1,873 posts
since May 2007