how would a simple c++ console program be writting to copy a file from one location to another and overwriting a file with its same name when it copies?
how would a simple c++ console program be writting to copy a file from one location to another and overwriting a file with its same name when it copies?
hey, it's klinerr!!
i can't answer your question because i'm really tired and can't comprehend what you said. oh well...
welcome back.
you left, right?
damn boy i remeber you from a long time ago in a galaxy far far away. didnt think anyeone woudl recognize me.
anyways if your wondering where ive been than too bad i just got back a few weeks ago something like that. i finlly got a chance oout get out and do something though. great stuff
Open the source file for reading (ifstream).
Open the destination file for writting (ofstream).
Read from the source and write to the destination.
Close both files.
Working with files faq.
gg
thanks codeplug (im just getting back into this so half the commands are out of my brain) took me a long time to just make the simple setup with a cout line
meh, try using CopyFile:
http://msdn.microsoft.com/library/de...e/copyfile.asp
CopyFile("C:\\myfile.txt","C:\\mynewfile.txt",true );
returns false if the file mynewfile.txt already existed. set true to false to just overwrite the file instead of generating an error