我收到错误:

hashing.cpp: In function ‘int main(int, char**)’:
hashing.cpp:96: error: expected type-specifier before ‘Linked_HashTable’
hashing.cpp:96: error: cannot convert ‘int*’ to ‘LinkedList_HashTable*’ in initialization
hashing.cpp:96: error: expected ‘,’ or ‘;’ before ‘Linked_HashTable’

当我编译我的代码。我想我缺少一些很容易弄清楚的东西。

给我错误的代码是:
Array_HashTable *linear_div_hash = new Array_HashTable(sizeDiv);
LinkedList_HashTable *chain_div_hash = new Linked_HashTable(sizeDiv);
Array_HashTable *doubleHash = new Array_HashTable(sizeDiv);
Array_HashTableLinkedList_HashTable()的构造函数都采用一个类似于sizeDiv的整数。任何帮助是极大的赞赏。

谢谢!

最佳答案

应该

LinkedList_HashTable *chain_div_hash = new Linked_HashTable(sizeDiv);


LinkedList_HashTable *chain_div_hash = new LinkedList_HashTable(sizeDiv);

? (请注意,代码中缺少List)。

10-08 08:16