0

我正在用 C 语言维护一个复杂结构树。结构如下。现在我想要一些库或源代码,可以让我从文件中保存和检索复杂结构的二叉树。非常感谢您的帮助。

typedef struct rb_red_blk_node {
    int isdataNode; /* if isdataNode=0 then the node is not the one carrying data */
    int red; /* if red=0 then the node is black */
    int Maxnodecount;

    // For hash nodes only.
    off_t heighestnodeleftsubtree;
    char* hash;
    int filecounter;
    //void* key;

    // For datanodes nodes only.
    off_t startkey; // Starting bytes of file.
    off_t endkey;   // Ending bytes of file.
    char *filename;
    void* info;

    struct rb_red_blk_node* left;
    struct rb_red_blk_node* right;
    struct rb_red_blk_node* parent;
} rb_red_blk_node;
4

0 回答 0