A
Allan M. Bruce
I attended an interview yesterday for a programming job and was asked to
create an implementation of a struct using as little memory as possible. I
had one struct defined as follows:
typedef struct tagFoo
{
struct entry *bar;
} foo;
However, they wanted me to be able to use the following code to create a
strct foo.
foo x = NULL;
They did show me how it was done but now I cannot remember the syntax, it
was something like:
typedef struct entry *bar foo;
Can anybody shed some light on what this should be?
Thanks
Allan
create an implementation of a struct using as little memory as possible. I
had one struct defined as follows:
typedef struct tagFoo
{
struct entry *bar;
} foo;
However, they wanted me to be able to use the following code to create a
strct foo.
foo x = NULL;
They did show me how it was done but now I cannot remember the syntax, it
was something like:
typedef struct entry *bar foo;
Can anybody shed some light on what this should be?
Thanks
Allan