如何访问嵌套在二叉搜索树中的队列中的变量

问题描述 投票:0回答:0
typedef struct {
    int lineNum;
    struct queNode *next;
} queNode;

typedef struct {
    char word[64];
    struct treeNode *left;
    struct treeNode *right;
    struct queNode *front;
    struct queNode *rear;
} treeNode;

所以我试图通过二叉搜索树节点 treeNode 和队列节点 front 访问 lineNum

我试过 treeNode->front->lineNum 但 vscode 告诉我“不允许指向不完整类类型“struct queNode”的指针”。我该怎么办

c queue binary-search-tree
© www.soinside.com 2019 - 2024. All rights reserved.