Randomly eliminates an index in an array

Hi guys,

Can I have a sample code that randomly eliminates an index in an array:

ex.

string items[] = {"item1", "item2", "item3", "item4", "item5"};

then a condition stating that:

ex.
"item1 has been eliminated" and "the last item is item5"

Thanks in advance!
Sorry but I didn't get what actually you want to do?
Please come up with some use case please.
closed account (48T7M4Gy)
Set item1 at some value that designates it as "inactive" and decrement the count of 'active' elements.

Item5 is still at the RH end ...
Topic archived. No new replies allowed.