nuke1115   2년 전

vs에서는 정상적으로 동작되지만, scanf_s 부분이 백준에서는 오류를 발생시킵니다

scanf와 scanf_s 둘 다 stdio.h 파일에 정의되어있던데, 혹시 왜 백준에서는 scanf_s 는 오류를 발생시키는지 알수 있을까요?

protarie   2년 전

https://en.cppreference.com/w/...

As with all bounds-checked functions, scanf_s , fscanf_s, and sscanf_s are only guaranteed to be available 
if __STDC_LIB_EXT1__ is defined by the implementation and 
if the user defines __STDC_WANT_LIB_EXT1__ to the integer constant 1 before including <stdio.h>.

라고 적혀있는데, 백준 실행 옵션에는 __STDC_LIB_EXT1__를 정의하지 않았습니다.

댓글을 작성하려면 로그인해야 합니다.