I have a piece of code like this:
CODE
typedef struct
{
struct Node_u *pI;
struct Node_u *pD;
} NodeI;
typedef union
{
NodeI nInt;
unsigned char *data;
}Node_a;
typedef struct Node_u
{
Node_a nodo;
struct Node_u *pNext;
}Node;
In a function I'm working with union Node_a as a NodeI, I mean, I am using the nInt structure.
But later I will need that this union will change (in real time) to the char array, and not like an nInt. I cannot free() all the Node element because other elements will point to this union, but I do not mind if I loose *pI and *pD values. How can I do that?
Thank you so much!!