为int *阵列[32]一个指向32整数数组或32个指针的数组为int?有关系吗? [英] Is int *array[32] a pointer to an array of 32 ints, or an array of 32 pointers to int? Does it matter?
本文介绍了为int *阵列[32]一个指向32整数数组或32个指针的数组为int?有关系吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我写
int *columns[32];
我在定义与32的指针数组 INT
S'
或者是一个指向32数组 INT
S'
我如何区分这两种?是否有区别?
How do I differentiate between the two? Is there a difference?
推荐答案
当有疑问 - 问 CDECL
$> cdecl
Type `help' or `?' for help
cdecl> explain int *columns[32]
declare columns as array 32 of pointer to int
修改在回应评论:我发现CDECL源<一个href=\"http://www.google.com/$c$csearch/p?hl=en&sa=N&cd=2&ct=rc#4FSOSMZ6Pxc/distfiles/cdecl-2.5.tar.gz|cdecl-2.5/README&q=cdecl\"相对=nofollow>谷歌code搜索。它需要 GNU的readline 库。我认为它不应该编译它在Mac OS X或Windows的一个问题。
EDIT In response to comments: I found cdecl source on Google Code Search. It requires GNU readline library. I think it shouldn't be a problem to compile it on Mac OS X or Windows.
这篇关于为int *阵列[32]一个指向32整数数组或32个指针的数组为int?有关系吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文