I'm writing a console app, and I need to copy a file. I would prefer not to use a ifstream and ofstream, but I will if I have to.
I know there is a rename() and a remove() that can be used... is there a single function that would do copy()?
I'm writing a console app, and I need to copy a file. I would prefer not to use a ifstream and ofstream, but I will if I have to.
I know there is a rename() and a remove() that can be used... is there a single function that would do copy()?
I already know the method. I asked if there was a function.
>>I asked if there was a function.
Not unless you write it yourself :-)
*Cela*
If you're making a Win32 console app then CopyFile will work. Or it you want a simple C++ method -
ifstream i("file1");
ofstream o("file2");
o << i.rdbuf();
Joe
Many thanks!