alen¶
Category: array
GitHub: cute_array.h
Returns the number of elements in the array.
Parameters | Description |
---|---|
x | The x position of the window. |
y | The y position of the window. |
Code Example¶
Creating an array, adding an element, then decrementing the count to zero before freeing the array.
dyna int a = NULL;
apush(a, 5);
CF_ASSERT(alen(a) == 1);
alen(a)--;
CF_ASSERT(alen(a) == 0);
afree(a);
Remarks¶
a
must not by NULL
. This function returns a proper l-value, so you can assign to it, i.e. increment/decrement can be quite useful.
Related Pages¶
dyna
asize
acount
acap
afit
apush
apop
aend
alast
aclear
aset
arev
ahash
adel
astatic
afree