HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by cornstalks | Hacker News Reader
Parent
Full thread
cornstalks
·
Too bad it doesn't detect the mismatch between new and free.
View on HN
peapicker
·
And if you fix it to use delete instead of free, you get "can't delete void *" errors. Perhaps not the best example code.
gpderetta
·
and if you fix the void->int, the warning goes away.
htfy96
·
yeah that's why I changed int* to void* in the example, but I forgot to change new to malloc
Reply on news.ycombinator.com