What is c++ equivalent of remove and rename macro of c used for removing and renaming a particular file respectively.
Printable View
What is c++ equivalent of remove and rename macro of c used for removing and renaming a particular file respectively.
maybe you can use the 'system("")' function to execute dos commands. I usually work with the windows.h header, so I can use the win32 api functions DeleteFile() and CopyFile() to simplify the work.
niara
there are no standard c++ equivalents -- use remove() and rename(). The win32 api functions previously mentioned are not c++ either, but C functions so that they can be called by several different computer languages.
The C++ equivalents of remove and rename are remove and rename. :) The entire standard C library is also a part of the standard C++ library, so include <cstdio> and use std::remove and std::rename. How's that for a simple solution? :)Quote:
What is c++ equivalent of remove and rename macro of c used for removing and renaming a particular file respectively.