Manoj Sharma wrote:
> Hi,
>
> Can some one tell me whats wrong with following program.
> Following program is to create binary tree.
> I tryed this program on Solaris and getting following compile time error.
> "createTree.cpp", line 18: Error: Node* is not a structure type.
> "createTree.cpp", line 19: Error: Node* is not a structure type.
> "createTree.cpp", line 20: Error: Node* is not a structure type.
>
>
>         this.left = NULL;
>         this.right = NULL;
>         this.value = val;
>   

"this" is a pointer, so you must use "->" to access its members.

-- 
John Gaughan

Reply via email to