Is is saying, do these things point to exactly the same spot in memory, the same instance.
指向内存中的同一位置,同一个实例,深意义上的相等。
Or another way of thinking about it, is remember I said when I call that class definition it creates an instance, that's a pointer to some spot in memory that's got some local information around it.
也就是一个指向,内存中某处的指针,这个地方存有一些,这个实例的信息,浅意义的相等也就是说,看看这两个东西是不是。
For now the way to think about this is, cp2 when I call that class definition, it goes off and allocates a specific spot in memory that corresponds to that instance.
这个语句所做的,就是建立了,这个类型的实例cp1和,这个类型的特定版本,现在你们可以这么认为。
p1 because now they are pointing to exactly the same spot in memory.
和p2是不是同一东西?,Answer’s,yes,答案是肯定的,因为现在它们指向。
应用推荐