prg_vector_remove_unordered()
Abstract
Removes an element at the specified position in a vector, without preserving the order of the remaining elements.
Syntax
prg_vector_remove_unordered (vector_ptr, pos_index)
| Argument | Type | Description |
|---|---|---|
vector_ptr |
PrgT_Vector * |
the vector of interest |
pos_index |
unsigned long |
the position of the element to be removed |
Return Type
void *
The address of the element that is removed
Header
prg_vector.h
Details
The specified position must be within the bounds of the vector (i.e., it must be greater than or equal to 0 and less than the number of elements in the vector). Otherwise a NIL pointer is returned, and an error might be generated (depending on whether the application has enabled diagnostic error reporting). Potentially, if the vector has been sufficiently reduced, certain memory resources might be released. The address of the element in the specified position is returned.
Note: This function might change the order of the remaining elements in the vector, so care must be take if you use this function while iterating over the elements of the vector.