对指针的指针的指针运算(*的argv [])? [英] Pointer arithmetic on pointer of pointer (*argv[])?
本文介绍了对指针的指针的指针运算(*的argv [])?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
据我所知, foo的[酒吧]
等于 *(美孚+吧)
,但什么是 * foo的[酒吧]
等于,比如访问 *的argv [2]
?我在理解这个有些困惑,我以为可能像 *(*(富)+吧)
但我不确定。
I am aware that foo[bar]
is equal to *(foo + bar)
, but what is *foo[bar]
equal to, such as accessing *argv[2]
? I am somewhat confused in understanding this, I assumed maybe something like *(*(foo) + bar)
but am unsure..
我道歉,如果这是一个简单的答案。
I apologize if this is a simple answer.
推荐答案
这是我的理解,这是 **(富+吧)
为什么呢?
* foo的[酒吧]
分解为*和 foo的[酒吧]
因为*是在<$完成C $ C> foo的[酒吧] 取消引用。
*foo[bar]
breaks down to * and foo[bar]
since * is done after foo[bar]
is dereferenced.
您已经回答了什么 foo的[酒吧] == *(富+吧)
现在再添*,你已经有了 *(*(富+吧))
Now add another * and you've got *(*(foo + bar))
这也可以简化为 **(富+吧)
这篇关于对指针的指针的指针运算(*的argv [])?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文