warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead.
제목과 같은 경고의 경우 다음과 같이 변경해준다.
변경 전
FILE *fp = fopen(path, "r");
if (NULL == fp) {
변경 후
FILE* fp;
errno_t err = fopen_s(&fp, path, "r");
if (err != 0) {
0 댓글