So, would this function only delete files that are in the same folder as the code, or can it delete ANY file on your computer?
@PortfolioCourses Жыл бұрын
You should be able to use it to delete files in other directories, like the example here: pubs.opengroup.org/onlinepubs/007904975/functions/remove.html. Technically it will delete the file in the "current working directory" which should be the directory you run the compiled program in.
@montyGator Жыл бұрын
@@PortfolioCourses Great! Thank you!
@PortfolioCourses Жыл бұрын
You're welcome! :-)
@vicsteiner4 ай бұрын
Running it on Ubuntu and compiling with gcc In did not have to include stdlib.h. If I check man remove I see it is in stdio.h. So I do not have it clear in which situations we need to actually include stdlib.h? Or maybe this is just a system specificity?
@yusufkaramoglu61552 жыл бұрын
hello, i have a fileon windows 10 and the code gives me error 13 - permission denied, any ideas how i can fix that ?
@PortfolioCourses2 жыл бұрын
Great question Yusuf! :-) I would suggest checking the file permissions. For example if the file is read-only, then we won't be able to remove the file.
@anneforger12793 ай бұрын
it may sound really really silly, but at first you need to fclose() the file before deleting it. i spent an hour trying to find out why it wasnt working :c