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.
第一,基本结构是,你有一个,指向数据的指针,但是那个指针和数据,是分开的,通常错误是声明了一个指针,但是没有指向一个数据。
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.
这只是是一个指针指向,另一个指针指向的数据。
> Okay. Well, this code allocates a new integer pointee and this part sets x to point to it.
>,好的,呃,这段代码分配一个新的整型指针数据,这部分让x指向它。
y >> Yeah. We allocated the pointer y but we never set it to point to a pointee.
>,是的,我们分配了指针y,但是,没有指向任何数据。
Can you fix it so that y points to the same pointee as X?
你能使y指向x所指向的数据么?
应用推荐