Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delete file

Status
Not open for further replies.

butthead

Programmer
Feb 24, 2002
545
US
I have never been able to use the remove
funtion to delete files in the builder environment.
so I have relied upon the DeleteFile function native to builder. I am writing some code that I wish to keep
strictly C++ or C and not rely upon the borland stuff.

I am looking for portablilty. could any one help me
with this code.

Code:
#include <stdio.h>

int delete_file (char *s)
{
  int rtval;
  rtval = remove(s);
  return rtval;
}

it always returns a -1 and does not delete the file.

thanks in advance

tomcruz.net
 
you know when you do something real stupid,
you kinda feel real stupid.

like when I posted this problem I just forgot that I had solved that problem two years ago. I guess we all know how long its been since I used " remove (); " in my code.

so as usual never mind and thanks for all the help.

I think Ill go to sleep now.

tomcruz.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top