Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

[] has higher precedence than *, so without the parens you get "function returning array of two pointer to pointer to int" (which is illegal) instead of the desired "function returning pointer to pointer to array of two int".


So would that be equal to this?

    typedef int arr2int[2];
    typedef arr2int** ptr_arr2int;

    #define SIZE 1024
    static ptr_arr2int hnew() {
        return calloc(sizeof(int**), SIZE);
    }




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: