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:
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?
}
How to achieve this? Is this a 'good' way to do it?
Thanks a lot for help