这行代码有什么作用?
What does this line of code do?
p->next->next这个怎么样:
what about this one:
p->next->data如果我第一次做错了什么的,那就太好了。
SOrry if i did anything wrong 1st time.
推荐答案p->next->next
在这种情况下我们正在遍历链表。 我们基本上是导航两个链接节点。
In this case we are traversing the linked list. We are basically navigating two link nodes.
p->next->data这里,我们导航到下一个链表节点,然后访问其数据值。
Here, we are navigating to the next linked list node and then accessing its data value.
引用:
p-> next-> next
p->next->next
将其视为两步操作:
See it as a two-steps operation:
p->next为您提供指向列表下一个元素的指针,然后
gives you the pointer to the next element of the list, then
(p->next)->next为您提供指向元素的指针紧接着下一个,即指向项目'距离2'的指针。
gives you the pointer to the element immediately following the next, that is the pointer to the item 'at distance 2'.
Quote:p-> next-> data
p->next->data
使用类似的参数,你可以写
With a similar argument, you may write
(p->next)->data显示您正在访问数据成员列表的下一个元素。
showing you are accessing the data member of the next element of the list.
更多推荐
简单链接列表指针问题
发布评论