Synopsis

void *dar_Append(DAR_ARRAY *dar, const void *element)

Purpose

Pushes an element to the back of the dynamic array.

Description

Pushes an element to the back of the dynamic array. In a dynamic array, this is an amortized O(1) operation.

Input

dar

Dynamic array to push onto.

element

Element to push onto the back of the array.

Return

A pointer to the element if successful, or NULL if allocation fails or dar of a bad type.