It is important to know how to use pointers. The std::vector class abstracts that all away for you, making it useless when learning how to work with pointers.
@
frzatchary
Often, especially when working with pointers, it is useful to draw yourself a picture. (This is the best part, because I get to pull out the crayons and construction paper.)
┌─┬─┬─┬─┬─┬─┬─┬─┐
│D│e│s│s│e│r│t│ │
└─┴─┴─┴─┴─┴─┴─┴─┘
^ ^ ^
head | tail
to delete |
Of course you have a pointer to the first item in your array (the head).
You should also have a pointer to the item to delete.
And it is useful to have a pointer to the one-past-the-last item (the tail).
In order to "delete" the item, you need to "shift" everything on the right of "to delete" leftward one cell, so that it looks like this:
┌─┬─┬─┬─┬─┬─┬─┬─┐
│D│e│s│e│r│t│t│ │
└─┴─┴─┴─┴─┴─┴─┴─┘
^ ^ ^
head tail
|
All that takes is a simple loop.
Now you need to update your 'tail' pointer. (Assuming, of course, that you actually keep it somewhere. If you just caculated it by adding the number of items in your array to the 'head' pointer, then this step is pointless.)
┌─┬─┬─┬─┬─┬─┬─┬─┐
│D│e│s│e│r│t│t│ │
└─┴─┴─┴─┴─┴─┴─┴─┘
^ ^
head tail
|
Hope this helps.