Han*_*uda 4 c programming-languages
这两项声明如下:
int (*p)[8];
int *p[8];
Run Code Online (Sandbox Code Playgroud)
pax*_*blo 10
第一个是指向8个整数数组的单个指针,而第二个是8个指针的数组,每个指针都是一个整数.
如果你只是踢起来cdecl,这对于这种事情是很好的:
pax$ cdecl
Type `help' or `?' for help
cdecl> explain int (*p)[8];
declare p as pointer to array 8 of int
cdecl> explain int *p[8];
declare p as array 8 of pointer to int
cdecl> explain char*(*fp[])(int,float*);
declare fp as array of pointer to function (int, pointer to float)
returning pointer to char
Run Code Online (Sandbox Code Playgroud)
实际上有一个顺时针/螺旋规则你可以用来做这个,但我不必担心,因为我发现cdecl,出于同样的原因,我不再将大的任意32位数字从十进制转换为十六进制任何更多 - 我可以,如果我必须,但它用工具更容易:-)
| 归档时间: |
|
| 查看次数: |
600 次 |
| 最近记录: |