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:12

>>6
There is a way!

        char *str = (char*) malloc(sizeof(char)*1000);
        int *length = str-sizeof(int);
        printf("Length of str:%d\n", *length);

It works on GCC/MSVC and nobody uses other compilers

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