Module |
|
Header |
/Engine/Source/Runtime/Core/Public/Containers/Array.h |
Include |
#include "Containers/Array.h" |
SizeType Add
(
ElementType && Item
)
Adds a new item to the end of the array, possibly reallocating the whole array to fit.
Move semantics version.
Index to the new item
Parameter |
Description |
---|---|
Item |
The item to add |
ArraySnippet.cpp at line 14:
void ArraySnippet::PushBack()
{
// Push new elements to the back of the array.
StringArray.Add(TEXT("Hello"));
StringArray.Add(TEXT("Unreal"));
StringArray.Add(TEXT("Engine"));
//StringArray == ["Hello","Unreal","Engine"]
}