由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - can a pointer point to itself in c++?
相关主题
一个简单的java题发几个面试题
刚才重新回顾了一下那题FB面试题:binary tree inorder successor
贡献G电 估计挂了F家面经
reverse random pointers of a single linked list问道G家的面试题。
How can one determine whether a singly linked list has a cycle?G题,把binary tree里面的sibling节点连接起来
讨论一道题:找出一个board上的所有单词G,F,M的面试是只问算法题的coding和设计题么??
binary tree的in-order iterator怎么写?几道F家面试题
做了一下merge BST一个树,不一定是2叉树,让设计一个数据结构来serialize和 deserialize
相关话题的讨论汇总
话题: point话题: node话题: pointer话题: itself话题: pnode
进入JobHunting版参与讨论
1 (共1页)
t*****e
发帖数: 53
1
if yes, under what scenario? if not, why?
r***h
发帖数: 460
2
my answer would be yes.
the value of this point should be its own address.

【在 t*****e 的大作中提到】
: if yes, under what scenario? if not, why?
c*****k
发帖数: 467
3
this
y**i
发帖数: 1112
4
How?
If there is a value, say
void a;
the point to this value should be
void *pa = &a;
the point to this point should be
void **pb = &pa;
can pb = pa?
the type cannot match, right?

【在 r***h 的大作中提到】
: my answer would be yes.
: the value of this point should be its own address.

y**i
发帖数: 1112
5
if this is correct, can we write this->this->...?

【在 c*****k 的大作中提到】
: this
z***e
发帖数: 5393
6
"this" is private, you cannot call this->this->... outside the class.
inside the class, yes you can.
example:
struct Node
{
Node* next;
}
Node* pNode = new Node();
pNode->next = pNode;

【在 y**i 的大作中提到】
: if this is correct, can we write this->this->...?
Q******e
发帖数: 85
7
int a = 4;
int *p = &a;
p = (int*) &p;
h*******u
发帖数: 15326
8
pa=(void *)pb;

【在 y**i 的大作中提到】
: How?
: If there is a value, say
: void a;
: the point to this value should be
: void *pa = &a;
: the point to this point should be
: void **pb = &pa;
: can pb = pa?
: the type cannot match, right?

1 (共1页)
进入JobHunting版参与讨论
相关主题
一个树,不一定是2叉树,让设计一个数据结构来serialize和 deserializeHow can one determine whether a singly linked list has a cycle?
攒人品,Twitter 电面题目讨论一道题:找出一个board上的所有单词
贡献一道G家的onsite题和简单面经(已悲剧)binary tree的in-order iterator怎么写?
今天面的太惨了....做了一下merge BST
一个简单的java题发几个面试题
刚才重新回顾了一下那题FB面试题:binary tree inorder successor
贡献G电 估计挂了F家面经
reverse random pointers of a single linked list问道G家的面试题。
相关话题的讨论汇总
话题: point话题: node话题: pointer话题: itself话题: pnode