Q
Quing
I'm attempting to adapt some code I got from
http://www.inquiry.com/techtips/cpp_pro/10min/10mon0599.asp (line 1 is
#include <stdio.h> - see the HTML source). Of course before adapting
it, I need to get it working. With GCC I'm getting errors starting on
line 4 ('parse error before "NODE"'). This evidently has something to
do with the fact that NODE isn't fully defined before I'm using it.
If I change NODE * to void * (and cast some things in the functions),
it works great.
Is the original valid C? Can I use a pointer to the struct inside the
struct itself?
Thanks in advance.
--Quing (pronounced 'king')
http://www.inquiry.com/techtips/cpp_pro/10min/10mon0599.asp (line 1 is
#include <stdio.h> - see the HTML source). Of course before adapting
it, I need to get it working. With GCC I'm getting errors starting on
line 4 ('parse error before "NODE"'). This evidently has something to
do with the fact that NODE isn't fully defined before I'm using it.
If I change NODE * to void * (and cast some things in the functions),
it works great.
Is the original valid C? Can I use a pointer to the struct inside the
struct itself?
Thanks in advance.
--Quing (pronounced 'king')