J
Josh
I'm trying to define a data type that is an array of structures. I
have borrowed the following C code, which appears in a textbook by Aho
and Ullman:
typedef struct {
float dist;
LIST successors;
POTNODE toPOT;
} GRAPH[MAX];
While g++ doesn't object to this definition, the first time we try to
use GRAPH as a parameter in a function prototype g++ complains that the
"non-local function...uses anonymous type." I can only assume this is
caused by differences between C and C++. Any ideas for how I can
implement the desired array of structures? Your help would be
appreciated.
Best Regards,
Josh
have borrowed the following C code, which appears in a textbook by Aho
and Ullman:
typedef struct {
float dist;
LIST successors;
POTNODE toPOT;
} GRAPH[MAX];
While g++ doesn't object to this definition, the first time we try to
use GRAPH as a parameter in a function prototype g++ complains that the
"non-local function...uses anonymous type." I can only assume this is
caused by differences between C and C++. Any ideas for how I can
implement the desired array of structures? Your help would be
appreciated.
Best Regards,
Josh