Jump to content

C++ Programming/Code/Standard C Library/Functions/rename

From Wikibooks, open books for an open world

rename

[edit | edit source]
Syntax
#include <cstdio>
int rename( const char *oldfname, const char *newfname );

The function rename() changes the name of the file oldfname to newfname. The return value of rename() is zero upon success, non-zero on error.

Related topics
remove