• As we all know, this only works if there is a pointee, which kind of gets back to rule number one.

    众所周知,只有当有指针数据时,这个才起作用,这有点像第一条规则。

    哈佛公开课 - 计算机科学课程节选

  • Instead if we want this pointer to represent the address of something in as much as it points at that address let's just draw an arrow.

    如果我们想要让这个指针表示,数据的地址,它指向的地址,我用一个箭头表示。

    哈佛公开课 - 计算机科学课程节选

  • Number three, pointer assignment, takes one pointer and changes it to point to the same pointee as another pointer so after the assignment the two pointers will point to the same pointee.

    第三条,指针赋值,使一个指针,指向另外一个指针所指向的数据,赋值过后,两个指针会指向,同样的数据

    哈佛公开课 - 计算机科学课程节选

  • Number one, the basic structure is that you have a pointer and it points over to a pointee, but the pointer and pointee are separate and the common error is to set up a pointer but to forget to give it a pointee.

    第一,基本结构是,你有一个,指向数据指针,但是那个指针数据,是分开的,通常错误是声明了一个指针,但是没有指向一个数据

    哈佛公开课 - 计算机科学课程节选

  • Number two, pointer dereferencing starts at the pointer and follows its arrow over to access its pointee.

    第二,指针非关联化从指针开始,通过它的箭头,来使用它的指针数据

    哈佛公开课 - 计算机科学课程节选

  • x >> Okay. I'll dereference the pointer x 42 to store the number 42 into its pointee.

    >,好的,我废除这个指针,在指针数据中存储数字。

    哈佛公开课 - 计算机科学课程节选

  • The things they point to are called pointees and setting them is a separate step.

    我们指向的叫做指针数据,把它们分成不同的步骤。

    哈佛公开课 - 计算机科学课程节选

  • It just changes one pointer to point to the same thing as another.

    这只是是一个指针指向,另一个指针指向的数据

    哈佛公开课 - 计算机科学课程节选

  • Now, dereferencing works on y and because the pointers are sharing 13 that one pointee, they both see the 13.

    现在,解引用在y上起作用了,因为指针共享,同一个指针数据,它们两个都看到了。

    哈佛公开课 - 计算机科学课程节选

  • > Okay. Well, this code allocates a new integer pointee and this part sets x to point to it.

    >,好的,呃,这段代码分配一个新的整型指针数据,这部分让x指向它。

    哈佛公开课 - 计算机科学课程节选

  • So, how do you allocate a pointee?

    那么,你怎样分配一个指针数据

    哈佛公开课 - 计算机科学课程节选

  • GetFloating-- GetFloating-- GetFloat for a floating point number.

    还有-,得到一个浮点型的数据,并赋给一个浮点型的指针

    哈佛公开课 - 计算机科学课程节选

  • > No, this doesn't touch the pointees.

    >,不会,这个不会触及到指针数据

    哈佛公开课 - 计算机科学课程节选

  • I knew that. The pointees are separate.

    我知道,指针数据是分开的。

    哈佛公开课 - 计算机科学课程节选

  • It has a pointee.

    它有指针数据了。

    哈佛公开课 - 计算机科学课程节选

  • Say, Binky, I don't think dereferencing y is a good idea because, you know, setting up the pointee is a separate step and I don't think we ever did it.

    你说,Binky,我不认为不关联y是一个好主意,因为,你懂的,调定指针数据是一个单独的步骤,我不认为我们这样做了。

    哈佛公开课 - 计算机科学课程节选

  • y >> Yeah. We allocated the pointer y but we never set it to point to a pointee.

    >,是的,我们分配了指针y,但是,没有指向任何数据

    哈佛公开课 - 计算机科学课程节选

  • So, doing a dereference on x follows the arrow to access its pointee.

    那么,解除对应x的指针数据的,索引箭头。

    哈佛公开课 - 计算机科学课程节选

  • So it's an address, it's a pointer, address pointer, synonyms for now, so it's the address of a char so this makes sense because s1 is also the address of a char so if I wanted to make a copy of that address this is absolutely the right syntax.

    是一个地址,是一个指针,地址指针,也就是,char型数据的地址,这是有意义的,因为s1也是一个char型数据的地址,所以如果我想要复制那个地址,这个绝对是正确的语法。

    哈佛公开课 - 计算机科学课程节选

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定