简体   繁体   English

unsigned char的含义(* pArray [10] [10]);

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

以下声明是什么意思?

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. 这是一个2D 10x10 unsigned char *指针数组。

cdecl says: cdecl说:

declare pArray as array 10 of array 10 of pointer to unsigned char 将pArray声明为指向unsigned char的指针数组10的数组10

Basically what you did was to declare a 2-D Array of pointers. 基本上你所做的是声明一个2-D指针数组。

See this question: 看到这个问题:

Equivalent C declarations 等价C声明

Now try to parse this: 现在尝试解析这个:

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

[ In your mind of course ] [当然在你的脑海里]

www.cdecl.org says: www.cdecl.org说:

declare pArray as array 10 of array 10 of pointer to unsigned char 将pArray声明为指向unsigned char的指针数组10的数组10

The following post might help you if the 'unsigned char ' bit is troubling you : What is an unsigned char? 如果'unsigned char'位让你烦恼,以下帖子可能对你有所帮助: 什么是unsigned char?

Other than the unsigned int rest is pretty trivial 除了unsigned int rest之外,它非常简单

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM