Hacker News new | ask | show | jobs
by peapicker 2238 days ago
And if you fix it to use delete instead of free, you get "can't delete void *" errors. Perhaps not the best example code.
1 comments

and if you fix the void->int, the warning goes away.
yeah that's why I changed int* to void* in the example, but I forgot to change new to malloc