Hi All,
Consider the following piece of code:
struct foo1
{
unsigned char tag;
unsigned char length;
unsigned char value[];
};
struct foo2
{
unsigned char tag;
unsigned char length;
unsigned char value[];
};
struct foo3
{
unsigned char tag;
unsigned char length;
unsigned char value[];
};
struct foo4
{
unsigned char tag;
unsigned char length;
unsigned char value[];
};
struct abc
{
struct foo1 foo_1;
struct foo2 foo_2;
struct foo3 foo_3;
struct foo4 foo_4;
};
In 'C' struct foo1,foo2,foo3, foo4 cannot be members of struct abc as they declared with empty index. Is there any another method which solves the above scnerio to dynamically fill data into arrays in the structures.
Consider the following piece of code:
struct foo1
{
unsigned char tag;
unsigned char length;
unsigned char value[];
};
struct foo2
{
unsigned char tag;
unsigned char length;
unsigned char value[];
};
struct foo3
{
unsigned char tag;
unsigned char length;
unsigned char value[];
};
struct foo4
{
unsigned char tag;
unsigned char length;
unsigned char value[];
};
struct abc
{
struct foo1 foo_1;
struct foo2 foo_2;
struct foo3 foo_3;
struct foo4 foo_4;
};
In 'C' struct foo1,foo2,foo3, foo4 cannot be members of struct abc as they declared with empty index. Is there any another method which solves the above scnerio to dynamically fill data into arrays in the structures.
Comment