Creating a directory In C or C++
If you can use C++ (as suggested by the selected tags) and boost libraries, Boost filesystem can help you with the create_directory function.
If you don't want to have all boost libraries available in your project, you may download a tool called bcp to extract only the subset you need, in your case boost filesystem and its dependencies.
Use the mkdir function.
#include <sys/stat.h>
#include <sys/types.h>
int mkdir(const char *pathname, mode_t mode);
Call mkdir(2).