c++cdata-structures

How to check if a struct is NULL in C or C++


i have the following structure

typedef struct 
{
   char      data1[10];
   char      data2[10];
   AnotherStruct  stData;
}MyData;

for some reason the implementors choose not to make the stData as pointer, so i have to live with that. my problem is how do i check if the stData member is empty? because if it is empty i need to skip certain things in my code.

any help is appreciated


Solution

  • You need some way to mark AnotherStruct stData empty.