Thamks for your help. I thought VARIANT is only available in VB that's why I asked more. Now I will check _variant_t. Thanks again.
X
xonobo
@xonobo
Posts
-
How can I create a generic pointer? -
How can I create a generic pointer?Thanks a lot for your reply and ask: anyone knows a solution for C/C++?
-
How can I create a generic pointer?just read the reply of jhwurmbach below. That's my problem. void * do not help in that. but thanks...
-
How can I create a generic pointer?Hi list, I want to ask whether is it possible to have a pointer whose type can change according to the input. I want to make it clear waht I need by a little code below which is not possible to compile. I think there must be a very well known trick for this. Thanks in advance for your help. switch( datatype ) { case DT_INT8: char *myPntr = (char *)dataPntr case DT_UINT8: unsigned char *myPntr = (unsigned char*)dataPntr; case DT_INT16: short *myPntr = (short *)dataPntr; } dataPntr is a (void *). how can I create such myPntr? xonobo