1427번 - 소트인사이드
error: invalid conversion from ‘int (*)(int*, int*)’ to ‘__compar_fn_t’ {aka ‘int (*)(const void*, const void*)’} [-fpermissive]
이렇게 뜨는데 int compare(void* first, void* second) 를 int compare(const void* first, const void* second)로 바꿔야 하는 이유가 뭔가요???
댓글을 작성하려면 로그인해야 합니다.
pafaya3086 3년 전
error: invalid conversion from ‘int (*)(int*, int*)’ to ‘__compar_fn_t’ {aka ‘int (*)(const void*, const void*)’} [-fpermissive]
이렇게 뜨는데 int compare(void* first, void* second) 를 int compare(const void* first, const void* second)로 바꿔야 하는 이유가 뭔가요???