Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Using Remove() (http://www.go4expert.com/forums/using-remove-t3508/)

sinner 21Mar2007 08:36

Using Remove()
 
I am somewhat new to C and wanted to know how to implement a program to delete temp files. I have been unsuccessful in all my attempts. What am I doing wrong? ( I have included the appropriate headers)

Here is a sample of the operation i am trying to perform:

remove("C:\tempfile.tmp")

My syntax must be wrong!

Any help appreciated.

DaWei 21Mar2007 09:43

Re: Using Remove()
 
My crystal is in the shop for "ball" joints, but an ordinary mortal guess suggests that you need two backslashes. Check your documentation regarding escape characters. While you're checking, may as well look up how you overcome spaces in the path name, should you encounter those.

sinner 22Mar2007 08:00

Re: Using Remove()
 
Thanks,

That worked


All times are GMT +5.5. The time now is 02:50.