Here's a procedure that I can't run. The exe-file just quits here for unknown reason:
btree make_tree (btree a, btree b, char c)
{
btree p;
(p.root)->d=c;
(p.root)->ls=a.root;
(p.root)->rs=b.root;
return p;
}
btree is a class representing binary trees, its only attribute is node *root, where node is a single element of the object (content +2 pointers to other nodes). The procedure in question is supposed to construct a binary tree with the given root element (char c), left branch (btree a) and right branch (btree b).
Can anyone help me understand why the compiler doesn't accept this?