delete a file using fstream

Nov 9, 2011 at 7:36pm
Guyz i am working on a project in which i need to delete a whole file during the program. can anybody tell me please how can we do it.
Last edited on Nov 9, 2011 at 7:37pm
Nov 9, 2011 at 8:17pm
Nov 9, 2011 at 9:12pm
With the Microsoft C runtime, which comes with VC++, it's _unlink().

There is also C stdlib remove()
http://www.cplusplus.com/reference/clibrary/cstdio/remove/

And the WIN32 call, DeleteFile()
http://msdn.microsoft.com/en-us/library/windows/desktop/aa363915%28v=vs.85%29.aspx
Nov 10, 2011 at 2:04pm
thanx a lot guyzzzzzz.
Topic archived. No new replies allowed.