DISABLE ADBLOCK

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

Question

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

http://codeworldtechnology.wordpress.com/2009/08/27/insertion-deletion-and-traversal-in-fully-in-threaded-binary-search-tree/

No correct solution

OTHER TIPS

Errors:

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;
}*head=NULL  

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