Original Post
I have two void pointers:
void *val;
void *tmp;
I also know which type is hidden in the val pointer:
if(typ==TYPE_BOOL)
//...
else if(typ==TYPE_CHAR)
//...
else if(typ==TYPE_INT)
//...
else //must be string
//...
What I need to do is to copy the object, val is pointing at, and make tmp point at the copy - using new so that I can later use delete to get rid of it. I have tried memcpy and other less nice things, but nuthing works. Quite possibly I am just using memcpy wrongly or maybe I''m on the totaly wrong approach here?
-------------
E-)mil
"I feel like... I feel like...
Like taking over the world!"
- Day of the Tentacle