0001 template <typename K, typename V> Hashtable<K, V>::Hashtable ( int c ) { //创建散列表,容量为 0002 M = primeNLT ( c, 1048576, "../../_input/prime-1048576-bitmap.txt" ); //不小于c的素数M 0003 N = 0; ht = new Entry<K, V>*[M]; //开辟桶数组(假定成功) 0004 memset ( ht, 0, sizeof ( Entry<K, V>* ) * M ); //初始化各桶 0005 removed = new Bitmap ( M ); L = 0; //用Bitmap记录懒惰删除 0006 }