我有这个简单的代码,我想访问 HASH_TABLE 中的 ARRAYED_SET 中的一个元素,但我得到一个错误:
Error: target of the Object_call might be void.
What to do: ensure target of the call is attached.
这是我的代码:
class
APPLICATION
inherit
ARGUMENTS
create
make
feature {NONE}
make
local
elem: ARRAYED_SET[INTEGER]
table: HASH_TABLE[ARRAYED_SET[INTEGER], INTEGER]
do
create elem.make (3)
create table.make (1)
elem.put (4)
table.put (elem, 1)
table.at (1).go_i_th (1)
end
end