Namespaces
Variants
Views
Actions

std::rename

From cppreference.com
< cpp‎ | io‎ | c
Revision as of 18:42, 2 November 2012 by P12bot (Talk | contribs)

 
 
 
 
Defined in header <cstdio>
int rename( const char *old_filename, const char *new_filename );

Changes the filename of a file. The file is identified by character string pointed to by old_filename. The new filename is identified by character string pointed to by new_filename.

Contents

Parameters

old_filename - pointer to a null-terminated string containing the path identifying the file to rename
new_filename - pointer to a null-terminated string containing the new path of the file

Return value

0 upon success or non-zero value on error.

Example

See also

Template:cpp/io/c/dcl list remove
C documentation for rename