Y
Hacker News
new
|
ask
|
show
|
jobs
by
milesrout
3352 days ago
I don't see what is 'horrible programming practice' about
int *x = malloc(sizeof(int));
1 comments
maccard
3352 days ago
because malloc doesn't return an int
, it returns a void
link
milesrout
3352 days ago
malloc returns a void pointer because it implicitly converts to an int pointer, as it should.
link