   How do I dereference a pointer that's a member of a class?
  I know how to dereference stuff, like make something else equal to what''s stored in whatever the pointer''s pointing to.Object *pointerToObject;Object something_else;something_else = *pointerToObject; Now if I have a pointer in a class, what do I do?variable = *(pointer->variable_thats_also_a_pointer)this gives me a compiler error.  
quote:Original post by EGD Eric  variable = *(pointer->variable_thats_also_a_pointer)uhm, you forgot the ; Besides that it should work. I've done it a million times. My Site [edited by - Quasar3D on February 5, 2004 7:37:10 PM];  ur gunna have to be more specific dude...like the actual error, and a whole segment of code.from what you''ve given i can''t see any error. ;  the compiler error could be because:1) the member is private or protected.2) you missed off the semi-colon.3) the variable you are assigning to isn't of a correct type.It would be better to post the actual code and the actual error message. That's important information that when we are solving our own problems we have in front of us.   [edited by - petewood on February 6, 2004 4:12:03 AM];  Why are you trying to dereference a member variable anyway?  If another class really needs that data, provide a public member function to return it.--Dave Mikesell Software