26 lines
764 B
Markdown
26 lines
764 B
Markdown
\page standard-array ARC_Array
|
|
|
|
# Basic Overview
|
|
|
|
The ARC_Array is a simple type, all it does is have a `void *` to store the array data in and a `uint32_t` to store the size in. This type is mostly a helper type to cut down on the number of parameters needed within Archeus' functions
|
|
|
|
The API Reference for ::ARC_Array can be found here: arc/std/array.h
|
|
|
|
# Example
|
|
|
|
```c
|
|
#include <arc/std/array.h>
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
|
|
//initing the array (as it is a basic type there is no ARC_Array_Create or ARC_Array_Destroy)
|
|
ARC_Array exampleArray;
|
|
exampleArray.size = 4;
|
|
exampleArray.data = malloc(sizeof(uint32_t) * exampleArray.size);
|
|
|
|
//example function using an ARC_Array
|
|
ARC_Example_RunArray(&exampleArray);
|
|
|
|
//cleanup
|
|
free(exampleArray.data);
|
|
```
|