Question 4
Back to Exercise
Why does a static member function have no this pointer?
- A It is a compiler bug
- B It is called on the class, not on an object, so there is no object for this to point to Correct
- C this is only for constructors
- D It is private
Correct Answer: Option B
Consequently it can use non-static members only through an object passed to it.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!