| Author |
Entry class problem, add method not working properly.
|
Fredrik Komstadius
Greenhorn
Joined: Mar 29, 2002
Posts: 19
|
|
I have this weird problem that I can not figure out what do to with. I want to do the following thing with the help of my entry class: The thing is that I get the following error:
incompatible types found : BinSearchTreeArray.Entry required: int tree[temp].left = new Entry (o, temp);
I realise this might be a bit much for you guys to take a look at but any help would be greatly appreciated! [ October 15, 2002: Message edited by: Fredrik Komstadius ] [ October 15, 2002: Message edited by: Fredrik Komstadius ]
|
 |
Ron Newman
Ranch Hand
Joined: Jun 06, 2002
Posts: 1056
|
|
I don't see a declaration for "tree" anywhere in your code, so I don't know what fields it has or what type they are. Also, you have "extends AbstractSet" in a comment where it won't have any effect. You certainly cannot assign an Object (such as Entry) to an int. [ October 15, 2002: Message edited by: Ron Newman ]
|
Ron Newman - SCJP 1.2 (100%, 7 August 2002)
|
 |
Fredrik Komstadius
Greenhorn
Joined: Mar 29, 2002
Posts: 19
|
|
Tree is declared Entry[]Tree. And yea, starting to see that I'm assigning invalid types to an int. Thanx for the help!
|
 |
 |
|
|
subject: Entry class problem, add method not working properly.
|
|
|