Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- typedef enum { RED, BLACK } nodeColor;
- typedef char T[80];
- typedef struct rbt {
- struct rbt *left; /* left child */
- struct rbt *right; /* right child */
- struct rbt *parent; /* parent */
- nodeColor color; /* node color (BLACK, RED) */
- T data; /* data stored in node */
- } rbt_t;
- // <---- line 28 | this is starting from line 29 ---->
- extern void insertNode (rbt_t ** root, rbt_t *);
- extern void deleteNode (rbt_t **, rbt_t *);
- extern void initRoot (rbt_t **);
- extern rbt_t *smallestNode (rbt_t **);
- int main() {
- rbt_t RBT = { NULL, NULL, NULL, RED, };
- strcpy(RBT.data, "Hello World");
- printf("%s\n", RBT.data);
- return 0;
- }
Add Comment
Please, Sign In to add comment