I have a problem in my code.
Let's say we have a variable named X, and X must be tested if any value is assigned to it, and if not, then X is assigned.
I need to tell you that X is in fact a structure and I thought that the easiest way to do the test is to insert another field:
typedef struct X
{
field 1;
field 2;
int test; ->>the test variable, which is 0 if X.field_1 is not assigned and 1 if X.field_1 is assigned.
}
The only problem is that I think this would end up in using too much memory.
So please tell me what should I do.
Let's say we have a variable named X, and X must be tested if any value is assigned to it, and if not, then X is assigned.
I need to tell you that X is in fact a structure and I thought that the easiest way to do the test is to insert another field:
typedef struct X
{
field 1;
field 2;
int test; ->>the test variable, which is 0 if X.field_1 is not assigned and 1 if X.field_1 is assigned.
}
The only problem is that I think this would end up in using too much memory.
So please tell me what should I do.
Comment