I am new to data structures. I tried to make a ds_list that stores all the sockets in my server. Whenever client disconnects from the server I remove the socket from the list using ds_list_find_value. However whenever that happens everything in the list that has higher position than the value removed, changes its position to -1.
Example:
I have ds_list with values:
1,2,3,4,5
I remove "3" with ds_list_delete
The list becomes:
1,2
1 and 2 have normal positions (0 and 1) but 4 and 5 position is changed to -1
What I would like to happen is that the list becomes: 1,2,4,5
If anyone knows how to do this, I would love to know. Thank you
Example:
I have ds_list with values:
1,2,3,4,5
I remove "3" with ds_list_delete
The list becomes:
1,2
1 and 2 have normal positions (0 and 1) but 4 and 5 position is changed to -1
What I would like to happen is that the list becomes: 1,2,4,5
If anyone knows how to do this, I would love to know. Thank you