Incompatible pointer type

Posted by Boffin on Stack Overflow See other posts from Stack Overflow or by Boffin
Published on 2010-03-29T17:13:09Z Indexed on 2010/03/29 17:33 UTC
Read the original article Hit count: 168

Filed under:
|
|

Hello. I have the function with following signature:

void box_sort(int**, int, int)

and variable of following type:

int boxes[MAX_BOXES][MAX_DIMENSIONALITY+1]

When I am calling the function

box_sort(boxes, a, b)

GCC gives me two warnings:

103.c:79: warning: passing argument 1 of ‘box_sort’ from incompatible pointer type (string where i am calling the function)
103.c:42: note: expected ‘int **’ but argument is of type ‘int (*)[11] (string where the function is defined)

The question is why? Whether int x[][] and int** x (and actually int* x[]) are not the same types in C?

© Stack Overflow or respective owner

Related posts about c

    Related posts about gcc