Jump to content
  • Advertisement

Archived

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

RamboBones

This is technicly impossible right?

This topic is 5553 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'm having a slight problem with my compiler. With the following statement if( (Temp->Thing)==this) continue; Even if Temp->Thing is the same value as 'this' the if statement still fails. I should say that Temp->Thing is a void pointer and 'this' is well a pointer to a class, could this be a problem :S? EDIT: Just tried typcasting Temp->Thing to the same type as 'this'... still doesn't work EDIT2: It appears to be a problem with the 'this' pointer. Looking at the following code in the debugger void *this_thing=(void*)this; After the set operations this_thing IS NOT EQUAL to 'this'!. SO I'm presuming that C++ automatically typcasts 'this' in the if statement to void therefore it no longer equals it anyway... So does anyone know how I can make it typecast without changing it's value? EDIT3: Okay it seems that it's purely to do with the this pointer. Doing CGUIPlayer *Player=this //this is of type CGUIPlayer also gives me a wrong value. [edited by - RamboBones on May 3, 2003 4:27:00 AM]

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!