Programmatically Recursively Make Directory 
I want my program to create a file located at the path of the command parameter, i.e. `program /home/user/directory/that/doesnt/exist/file`. If the directory doesn't exist, `fopen` will fail to open the file, so the program would have to create the directories. Would I have to program my own loop to detect each slash and `mkdir` each directory or is there a function to do this automatically?
Programmatically Recursively Make Directory 
===

I want my program to create a file located at the path of the command parameter, i.e. `program /home/user/directory/that/doesnt/exist/file`. If the directory doesn't exist, `fopen` will fail to open the file, so the program would have to create the directories. Would I have to program my own loop to detect each slash and `mkdir` each directory or is there a function to do this automatically?