[C/C++]windowsにディレクトリを作成する

サンプルコード:
#include <windows.h>
#include <stdio.h>
int make_dir( char * p_path )
{
int result = 0;
DWORD last_error = 0;
result = CreateDirectory(p_path, NULL);
if ( result == 0)
{
last_error = GetLastError();
if ( last_error == ERROR_ALREADY_EXISTS)
{
result = 1;
}
}
return result;
}

Development

Posted by arkgame