No. Since you don't know the type that void * points to, a deep copy is out of the question.
In addition, you could not even make a deep copy a, since it can point to one of intthe array of them.
, C , , . :
struct teststruct {
int a_sz;
enum voidType vt;
int *a;
void *data;
};
a_sz , , a, data, , d_sz.
, data , , :
typedef struct {
enum voidType vt;
union {
int i;
float f;
double d;
}
} tVoidType;