Skip to main content
gamedev.net
🔒 Locked

this pointer

Started by dbdb Mar 7, 2003 at 5:56 PM 1 replies 700+ views
Original Post
dbdb
dbdb
I am totally confused when to use this->pointer and when to not use it? I have seen some people are using it, and some others aren''t ... also searched for an answer but couldn''t find one... any help would be appreciated... Thanks in advanced.
kuphryn
kuphryn
this is useful when dealing with overloaded operators.

Kuphryn
Matsen
Matsen
The this pointer is used in whatever situation an object need to identify or refer to itself. There are many situations when this is necessary, when overloading operators for instance.

quote:
when to use this->pointer and when to not use it?

Use it when you need to use it.

this->link might be useful.

Regards Mats

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.