Page 1 of 1

Delete a file from code

Posted: Sun Jul 19, 2009 9:46 pm
by Jane
Hi,

Is it possible to delete a file from C++ without using Win API function.

Thanks

Jane

Re: Delete a file from code

Posted: Tue Jul 21, 2009 3:24 pm
by Neo
int remove ( const char * filename );

If the file is successfully deleted, a zero value is returned.
On failure, a nonzero value is reurned and the errno variable is set to the corresponding error code.