【发布时间】:2015-05-26 01:59:15
【问题描述】:
这里发生了什么?我来了
必须使用'struct'标签来引用类型'node'
在gx 和hx 行
typedef struct node {
char * fx; // function
node * gx; // left-hand side
char * op; // operator
node * hx; // right-hand side
} node;
我也试过了
typedef struct node {
char * fx; // function
node * gx; // left-hand side
char * op; // operator
node * hx; // right-hand side
};
和
struct node {
char * fx; // function
node * gx; // left-hand side
char * op; // operator
node * hx; // right-hand side
};
和
typedef struct {
char * fx; // function
node * gx; // left-hand side
char * op; // operator
node * hx; // right-hand side
} node;
和
typedef struct treeNode {
char * fx; // function
treeNode * gx; // left-hand side
char * op; // operator
treeNode * hx; // right-hand side
} node;
我得到了所有这些错误。纯 C 中的正确语法又是什么?
【问题讨论】:
标签: c data-structures