API reference / Files, memory, and strings
SDL_arraysize
Macro, SDL3
Gives the number of elements in an array. This is a macro.
Declaration
#include <SDL3/SDL.h>
#define SDL_arraysize(array)Parameters
array | The array. It must be a real array, not a pointer. |
Example
#define QUESTION_COUNT ((int)SDL_arraysize(questions))See this code run in Multiple choice quiz. Download the full program (.zip)
In SDL2
The name is the same.