Original Post
Ok, suppose I have the following function:
void Callback(void *pData)
{
/*...*/
};
Where pData is going to point to a pointer of some struct , object or whatever, how do you cast the pointer so you are able to manipulate it (new and delete), I tried (example):
void Callback(void *pData)
{
int *ptrData = (int *) *pData;
};
but that way it won''t compile with the error `void*'' is not a pointer-to-object type, I also did
void Callback(void *pData)
{
int *ptrData = (int *) pData;
};
but I think that wont work, since it will be then a pointer to int and that int will be the other pointer and not the actual int I am looking for, finally I also did:
void Callback(void *pData)
{
int *ptrData = (int *) &pData
};
And it compiled, but I decided that on that last try I don''t even know what I am doing and instead decided to ask here