Jump to content
  • Advertisement
Sign in to follow this  
Alima

Class question

This topic is 5458 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

Ive been looking through several posts here and examples and such and theres something ive noticed about using funtions in a class. Sometimes people use "Class.function()" and sometimes they use "Class->function()" what is the difference between the two? Thanks in advance. Alima

Share this post


Link to post
Share on other sites
Advertisement
The . operator acts on an object. The -> operator dereferences a pointer and then acts on the object that the pointer is pointing to. -> is just shorthand for (*Class).function().

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!