C4 Engine
C4 Engine API Documentation

Array::AppendArrayElement

Defined in:  TSArray.h
Adds an object to the end of an array.
Prototype

template <typename T> type *AppendArrayElement(T&& element);

template <typename T> type *AppendArrayElement(void);

Parameters
element The new element to add to the array.
Description
The AppendArrayElement function increases the size of an array by one and either copy-constructs or move-constructs the new element using the object referenced by the element parameter, depending on whether an lvalue reference or rvalue reference is passed to the function. If the parameter is omitted, then a default-constructed element is appended to the array. The return value is a pointer to the newly appended element in the array.
See Also

Array::InsertArrayElement

Array::RemoveArrayElement

Array::RemoveLastArrayElement

Array::GetArrayElementCount

Array::SetArrayElementCount