开发者

Meaning of unsigned char (*pArray[10][10]);

What开发者_运维百科 does the following declaration mean?

unsigned char (*pArray[10][10]);


Declaration

unsigned char (*pArray[10][10]);

is exactly equivalent to

unsigned char *pArray[10][10];

The parentheses are entirely redundant and have no effect at all. This is a 2D 10x10 array of unsigned char * pointers.


cdecl says:

declare pArray as array 10 of array 10 of pointer to unsigned char

Basically what you did was to declare a 2-D Array of pointers.

See this question:

Equivalent C declarations

Now try to parse this:

int **(*f)(int**,int**(*)(int **,int **));

[ In your mind of course ]


www.cdecl.org says:

declare pArray as array 10 of array 10 of pointer to unsigned char

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜