I have this problem. I have a hashtable and I would like to use enum to know which position is occupied and which one had its element deleted.
My enum is this:
Now, I would like to go through the table and check if a position is occupied or deleted.Code:Status status;
enum Status{occupied,deleted};
This is the idea I have in mind.
for(int i = 0; i < tableSzite; ++)
if(status != occupied) //do this...
if(status == deleted)// do this...
But for this I will need an enum at least as large as tableSize, and I only have two status. I am just stuck here, any help is appreciated.