Creating Directories in standard C/C++

Hello guys,

I want to create a directory structure from pure C/C++ application without the use of the windows API.

can someone post for me a snippet of code that does such a directory creation.

and I use the visual studio environment for programming (Visual Studio 2008)

Thanks guys.
Last edited on
You can't do that without the OS's API.
You could always use the C/C++ libraries but they always call Windows API. It's kinda unavoidable.
The Boost Filesystem library provides a nice, OS-neutral interface for this sort of thing.
I wouldn't exactly call it "nice"... but it certainly is comprehensive and OS neutral.


Really my biggest problem with boost is the lack of coherent documentation. The docs available are all just as dense as the source. The filesystem lib in particular is a maze types, and none of the type details are clearly outlined anywhere. I had to do a lot of digging, and trial and error to get it to work.
Thanks guys, i have been going through the boost API interface. i think it will be a good alternative
Really my biggest problem with boost is the lack of coherent documentation. The docs available are all just as dense as the source. The filesystem lib in particular is a maze types, and none of the type details are clearly outlined anywhere. I had to do a lot of digging, and trial and error to get it to work.

I've noticed this as well, for some libraries. Others are documented pretty well. Consider contributing some documentation improvements.
Last edited on
Topic archived. No new replies allowed.