Visual C++ Pointers
-
Hi! I wanna preserve "this" pointer's address to some member variable, so that, at some later stage, i can reuse this address. If any one knows the solution (Visual C++'s reference), kindly inform me as soon as possible. Thnx Usman Arif Usman Arif
-
Hi! I wanna preserve "this" pointer's address to some member variable, so that, at some later stage, i can reuse this address. If any one knows the solution (Visual C++'s reference), kindly inform me as soon as possible. Thnx Usman Arif Usman Arif
I don't understand your question ?
this `is always available within the class. class MyClass; class MyClass { MyClass* m_pMyClass; void DoSomething(); }; ... void MyClass::DoSomething() { m_pMyClass = this; } * * * [Maximilien Lincourt](http://www.thesorus.qc.ca) **Your Head A Splode** - _Strong Bad_`
-
Hi! I wanna preserve "this" pointer's address to some member variable, so that, at some later stage, i can reuse this address. If any one knows the solution (Visual C++'s reference), kindly inform me as soon as possible. Thnx Usman Arif Usman Arif
You might also want to be careful that if you did store the address, you don't try to use it after the class is destroyed.