#include "hashitr.h" Hashitr::Hashitr() { } Hashitr::Hashitr (Hashtable * some_table) { table = some_table; index = -1; } bool Hashitr::get_next(Type * & s, int & pos) { bool done = false; while (table->get_data(++index) == 0 && index < TABLE_SIZE); // find next used position in table if (index == TABLE_SIZE) { done = true; s = 0; pos = -1; } else { s = table->get_data(index); pos = index; //shows which indexes in the array are filled } return done; }