Hello..
I want to get address of smart pointer but I have no idea how to do that - I need a unique key for each class instance..
I use boost smart pointer.
The way I would do it with normal pointer:
How to achieve this? Is this a 'good' way to do it?Code:class someclass { public: someclass() { } char test; bool yes; }; typedef boost::shared_ptr<someclass> someclass_p; //smart pointer void main() { someclass *test = new someclass(); DWORD bu = (DWORD) test; std::cout << "pointer: " << bu << "\n" ; someclass_p testp = someclass_p( new someclass() ); //How do I get address here? }
Thanks a lot for help



LinkBack URL
About LinkBacks


