Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Why is C so bad?

Name: Anonymous 2011-10-14 1:31

Why can't I just declare a function without specifying the return type? Surely the C compiler would be able to figure out the type from what I am returning.

Name: Anonymous 2011-10-14 6:07

The official FAQ explains why C is so bad.

http://www.c-faq.com/malloc/sizeof.html
Q: Why doesn't sizeof tell me the size of the block of memory pointed to by a pointer?
There is no portable way to find out the size of a malloc'ed block. (Remember, too, that sizeof operates at compile time, and see also question 7.27.)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List