由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - C++ Q70: this pointer (skillport)
相关主题
C++ Q70: this pointer (skillport) (转载)
相关话题的讨论汇总
话题: pointer话题: skillport话题: function话题: object话题: calling
进入JobHunting版参与讨论
1 (共1页)
c**********e
发帖数: 2007
1
Which one of the following operations requires explicit use of a this
pointer?
a) Calling a member function that requires a pointer to that object from
another member function in the same object?
b) Calling a global function that requires a pointer to that object from
a member function?
a****o
发帖数: 686
2
a),b)应该都可以写成需要this的形式。
请问什么是 skillport???
多谢。
但是如果b)不是 “in the same object”,则可以取地址&。而不是this。

【在 c**********e 的大作中提到】
: Which one of the following operations requires explicit use of a this
: pointer?
: a) Calling a member function that requires a pointer to that object from
: another member function in the same object?
: b) Calling a global function that requires a pointer to that object from
: a member function?

c**********e
发帖数: 2007
3
The answer is b).
Skillport is a training company.
1 (共1页)
进入JobHunting版参与讨论
相关主题
C++ Q70: this pointer (skillport) (转载)
相关话题的讨论汇总
话题: pointer话题: skillport话题: function话题: object话题: calling