I'm trying to use _unlink. I'm a C++ beginner. I use the following code but get the error message "invalid argument"
I followed the example in the docs and put void inside the main brackets but this gets a warning message so I took it out .
The code compiles but fails. I certainly need a little guidance. And I'm starting 'small'
Thanks hugh
#include <stdio.h>
int main( )
{
if (_unlink("c:\tump.txt"
== -1 )
perror( "could not delete it"
;
else
printf( "deleted that file \n"
;
}
I followed the example in the docs and put void inside the main brackets but this gets a warning message so I took it out .
The code compiles but fails. I certainly need a little guidance. And I'm starting 'small'
Thanks hugh
#include <stdio.h>
int main( )
{
if (_unlink("c:\tump.txt"

perror( "could not delete it"

else
printf( "deleted that file \n"

}