data_structures
Functions
array_set.c File Reference
#include "array.h"
+ Include dependency graph for array_set.c:

Go to the source code of this file.

Functions

void array_set (t_array *array, size_t index, const void *content)
 Replaces the element at the specified position in this array with a copy of the specified element. More...
 

Function Documentation

◆ array_set()

void array_set ( t_array array,
size_t  index,
const void *  content 
)

Replaces the element at the specified position in this array with a copy of the specified element.

Parameters
indexThe index (0-based counting)
contentThe item to be copied.
Exceptions
ENOMEMMemory allocation error
EINVALIndex is out of range

Definition at line 16 of file array_set.c.