Linux
#include <sys/stat.h>
mkdir (const char *path, mode_t mode);
in this case mode = O_CREAT. Function returns an int. Lookup "man mkdir", if memory serves me correctly for more details.
Windows
#include <windows.h>
CreateDirectory (char *DirName, SECURITY_ATTRIBUTES Attribs);
If the function succeeds returns non-zero otherwise NULL.