2016년 4월 19일 화요일

visual studio 폴더 만들기

if (CreateDirectory(OutputFolder.c_str(), NULL) ||
    ERROR_ALREADY_EXISTS == GetLastError()){
    // 파일생성이 실패하고 그 이유가 이미 존재했기때문이라면.
    // DoSomthing(...)
}
else {
     // 만든경우 할일...
}

<출처: http://stackoverflow.com/questions/9235679/create-a-directory-if-it-doesnt-exist>