C4 Engine Terathon Software C4 Engine API Documentation

• Utility Library

API Links
Developer Links

Array::RemoveElement

Defined in:  C4Array.h
Removes an object from an array.
Prototype

void RemoveElement(int32 index);

Parameters
index The location at which to remove an object.
Description
The RemoveElement function decreases the size of an array by one, destroys the object at location index, and moves all of the existing elements at location index + 1 or greater down by one. When the existing elements are moved, they are copy-constructed to their new locations, and the old objects are destroyed.

If the index parameter is greater than or equal to the current size of the array, then calling the RemoveElement function has no effect.
See Also

Array::InsertElement

Array::AddElement

Array::GetElementCount

Array::SetElementCount