hmm, compiling on linux with command and options "gcc str.c -Wall -pedantic" gives no errors or warnings. this is what i am compiling, of course based on your code snippets:
Code:
typedef struct tree_node
{
char *word;
int index;
struct tree_node *left;
struct tree_node *right;
}Tree;
typedef struct tree_node *Tree_ptr;
Tree_ptr addtree(Tree_ptr ,char *);
int main()
{
char * job;
Tree_ptr root;
root=addtree(root,job);
return 1;
}
Tree_ptr addtree(Tree_ptr a,char *b){
return a;
}
is "job" of correct type? what compiler are you using?