Return
Styles:
Pseud0ch
,
Terminal
,
Valhalla
,
NES
,
Geocities
,
Blue Moon
.
Entire thread
malloc() and free()
1
Name:
Anonymous
2010-05-08 7:00
So I was reading a Sepples tutorial for experienced C users and that guy keeps telling me that
new
and
delete
are better than
malloc
and
free
.
Why? What's wrong with them?
23
Name:
Anonymous
2010-05-08 17:19
There is no need to cast the result of library functions that return void *; it makes your code hard to read, adds no value, and can hide a bug if you don't have a valid prototype in scope. See
http://www.cpax.org.uk/prg/writings/casting.php
and
http://c-faq.com/malloc/mallocnocast.html
Newer Posts
Don't change these.
Name:
Email:
Entire Thread
Thread List