Image

Hey guys, just a fairly quick question - don't need you to actually do my coursework for me ;)

I have a class that needs to store a load of objects - an example would be a class called CustomerStore, that looks after multiple Customer objects.
The customer objects are all refered to by other parts of the program by a customer ID - which is mostly contiguous (1,2,3,4,5 - n) etc.

Main thoughts were storing in a hash table
Or as the numbers were mostly contiguous store in a vector list with a seperate vector list or array of customerIDs to point at the relevant objects.

The only problem I have is when it comes to deleting objects. Anyone got any ideas on how to handle this gracefully? The IDs for other objects need to stay the same and new objects can't resuse them.

I apologise if the above doesn't make sense/is really blindingly obvious...

Cheers