Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Functions calling themselves?
I am taking a day or two off from my world editor to build a simple (actually, rebuild) temporary file remover, which will delete all the files in "WindowsTEMP" and in any of it's subfolders, as well as the actual subfolder. I have two questions about this though. When FindFirstFile or FindNextFile return, they only return the file or directory name, and I need the full drive and path to delete files and subfolders. Second, can a function call on itself? The way I plan on doing it is this (this is my actual code so far):
void remove(char place)
fn = FindFirstFile(place, &fd);
if(fd.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY)
First get the full path and directory name
Now call remove() with that info
Once it returns, you can delete the empty folder!
//Just delete the file, if not a dir
//Code in a loop with FindNextFile here!
void clean(HWND cwnd)
if(strstr(paths, "Not used.") == NULL)
Can somebody please help me out with this? I appreciate it.
0 · ·