Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

dbdb

this pointer

This topic is 5588 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!