(This is the legacy documentation for stable SDL2, the current stable version; SDL3 is the current development version.)

SDL_arraysize

The number of elements in an array.

Header File

Defined in SDL_stdinc.h

Syntax

#define SDL_arraysize(array)    (sizeof(array)/sizeof(array[0]))

CategoryAPI, CategoryAPIMacro, CategoryStdInc