作者tiffiej (小小)
看板EE_DSnP
標題[問題] myHash.h
時間Sat Jun 20 19:51:21 2009
我compile剩下幾個error可是一直不知道為什麼 >"<
(1)
../myHash.h: In instantiation of 「Hash<A, double>::iterator」:
testHash.cpp:31: instantiated from here
../myHash.h:59: 錯誤:類型為 「std::pair<A, double>」 的參數的預設引數卻有類型 ?
../myHash.h: In member function 「bool Hash<HashKey, HashData>::iterator::operat ta = double]」:
line 59是進去 class iterator 的第一行
=======================================================
(2)
testHash.cpp:32: instantiated from here
../myHash.h:207: 錯誤:將 「const A」 做為
「bool A::operator==(const A&)」 的 「this」 引數時丟棄了類型限定
line 207是
bool operator != (const iterator& i) const {
return !(_data.first==i._data.first); }
_data is a HashNode type object.
有沒有人知道為什麼 T__T
thanks.
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.225.73