If you want to write cross-platform code, you can use boost::filesystem routines
#include <boost/filesystem.hpp> boost::filesystem::create_directory("dirname");
This adds a library dependency, but most likely you are going to use other file system routines, and boost::filesystem has some excellent interfaces for this.
If you only need to create a new directory, and if you intend to use VS 2008, you can use _mkdir() , as others have noted.
Tibor
source share