ADBlock is blocking some content on the site

ADBlock errore

clould someone help me with this? why doesn't it compile? [closed]

StackOverflow https://stackoverflow.com/questions/14276864


This is a threaded binary search tree. could you help me find out why it doesn't compile?


No correct solution



tree.c: In function ‘main’:
tree.c:51: warning: incompatible implicit declaration of built-in function ‘exit’
tree.c:51: error: too few arguments to function ‘exit’
tree.c: In function ‘preorder’:
tree.c:327: warning: comparison between pointer and integer

I can see exit(); is wrong correct it exit(0);

at line 327: if(ptr->right_ptr==link) Is wrong because link is integer defined as:

typedef enum { thread,link} boolean;    

where as right_ptr; is pointer:

struct node
  struct node *left_ptr;
  boolean left;
  int info;
  boolean right;
  struct node *right_ptr;

I advise that this code is broken there is other many bugs, don't use it!


Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow