Variable length structures tutorial
struct node_t
{
long id;
char *name;
long nchild; // number of children
long child[]; // children
};
node_t n0 = { 0, "first", 2, { 1, 2 } };
node_t n1 = { 1, "second", 1, { 3 } };
node_t n2 = { 2, "third", 1, { 4 } };
node_t n3 = { 3, "fourth", 0, };
node_t n4 = { 4, "fifth", 0, };



Last updated
Was this helpful?
