posted 18 years ago
You don't need a declaration for int p, and the line with = separately.
You can write int p = tree.getPrice();
I actually tried condensing your code, so your method comes out as:
and it compiles and runs nicely.
CR
I have also reverted to your original code, and it compiles without any reported errors.
[ October 16, 2005: Message edited by: Campbell Ritchie ]