malloc() 결과값의 캐스팅
stackoverflow.com/questions/605845/do-i-cast-the-result-of-malloc Do I cast the result of malloc? In this question, someone suggested in a comment that I should not cast the result of malloc, i.e. int *sieve = malloc(sizeof(int) * length); rather than: int *sieve = (int *) malloc(sizeof(int) * stackoverflow.com 1. 캐스팅은 하지 않아야 한다 malloc() 함수를 사용하면서 실수로 헤더를 include 하지 않았을 때, malloc()의 결과값을 명시적으로 캐..