开发者

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

开发者 https://www.devze.com 2023-02-27 03:10 出处:网络
What开发者_运维百科 does the following declaration mean? unsigned char (*pArray[10][10]); Declaration

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

精彩评论

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