![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Expert Programmer
Join Date: Sep 2004
Location: Ontario, Canada
Posts: 579
Rep Power: 5
![]() |
I've been playing around with fopen and creating files and such...Is there a way to delete files using C?
__________________
Johnny was a chemist's son but Johnny is no more, for what Johnny thought was H2O was H2SO4 |
|
|
|
|
|
#2 |
|
Expert Programmer
|
I believe that command you are looking for is unlink( ); IT is included in the unistd.h header file.
__________________
Clifford Matthew Roche <geek@cliffordroche.com> Web Hosting: http://www.crd-hosting.com Consulting: http://www.crdev-consulting.com |
|
|
|
|
|
#3 |
|
Programmer
|
Just in case you're speaking of windows:
Iirc, the unistd.h is only in the POSIX standard C lib(variants, derivations?). It would work in windows if compiled under SFU or Cygwin. Other than that, try to find unlink() in a windows lib. Their are other way, but the suggested method above should be effective.
__________________
<span style='font-size:14pt;line-height:100%'><span style='color:red'>"Political power grows out of the barrel of a gun" - Mao Tse-Tung</span></span> |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|