본문 바로가기
[ ★ ]Study/Programming

파일 유무 확인(C++)

by nroses-taek 2020. 2. 26.

#include "tchar.h"
#include "shlwapi.h"

#pragma comment(lib, "shlwapi.lib")

    if (PathFileExists(szDllPath))
        _tprintf(L"File Exist\n");
    else {
        _tprintf(L"File doesnt Exist\n");
        return FALSE; // 함수 리턴값에 따라 -1 or FALSE
    }

---------------------------------------------

#include "shlwapi.h" 

#pragma comment(lib, "shlwapi.lib")

    if (PathFileExists(szDllPath)) 
        printf("File Exist\n"); 
    else { 
        printf("File doesnt Exist\n"); 
        return FALSE; // 함수 리턴값에 따라 -1 or FALSE
    }

댓글