+ 2

Hello everyone i have some Questions

Are there any commands in C++ to copy files or rename files? I want to know that because i want to write a programm to save some of my files on an external hard drive.

3rd Jan 2017, 1:00 PM
Aquila LP
Aquila LP - avatar
3 Respuestas
+ 3
Rename: #include <stdio.h> int main () { char oldname[] ="oldname.txt"; char newname[] ="newname.txt"; int result= rename( oldname , newname ); if ( result == 0 ) puts ( "File successfully renamed" ); else perror( "Error renaming file" ); return 0; }
3rd Jan 2017, 5:20 PM
Tamás Barta
Tamás Barta - avatar
3rd Jan 2017, 5:22 PM
Tamás Barta
Tamás Barta - avatar
+ 1
Thank you all :)
3rd Jan 2017, 5:39 PM
Aquila LP
Aquila LP - avatar