別のチェーンを使用したハッシュ テーブルの実装に関する手書きのメモに従っています。特に、私はこの機能を探しています:
list<ListCell>::iterator TablaHash::FoundOnList(int key, int table_row){
for(list<ListCell>::iterator found= table[table_row].begin();
found != table[table_row].end();found++){
if((*found).Key() == key){
return found;
}
}
return Ø;
}
ここで、最後の記号は空集合です。そこに「空の」イテレータを返す必要があることは理解していますが、どうすればよいですか? 多分 end() イテレータを返しますか?