The issue is that p->Left() and p->Right() are r-values and this means you cannot make references of them. The problem arises because p->Left() is returning some value (Of type Node *), which is being copied into the parameter of ReadBinaryTree.
To fix this, your p->Left() and p->Right() functions should return NODE & values (So that your recursion has access to the exact same pointer as is in the parent node, and not just some copy of it).
Also, NODE p = new Node; should just be p = new Node;.
However, can I suggest that you convert this function into one that returns a value? i.e.
NODE ReadBinaryTree(ifstream &File)
{
char ch; File.get(ch);
if(ch != '#')
{
NODE p = new Node;
p->setFreq(ch);
p->Left() = ReadBinaryTree(File);
p->Right() = ReadBinaryTree(File);
return p;
} else return null;
}
This code still needs the left and right accessors to return references.
EDIT: Explanation of why references can't take r-values
p->Left() (the accessor function) is returning a copy of the left pointer. So while the value is the same as p->left (the attribute), the location in memory is different, and importantly, p->Left() has been assigned a temporary memory location, because it is an expression, and it was expecting a variable to be 'put into'. Normally, when you pass the expression into a function, it is 'put into' the parameter it is passed in as, but if that parameter is a reference, it expects there to already be a non-temporary memory location, which it adopts as its own. So, when you pass an expression (which has a temporary memory location) to something expecting a reference, it complains because it was expecting something with an already fixed memory location, for it to adopt.