API reference / Files, memory, and strings
SDL_zero
Macro, SDL3
Fills a variable or a struct with zeros. This is a macro, so you give the object and not its address.
Declaration
#include <SDL3/SDL.h>
#define SDL_zero(x)Parameters
x | The object. |
Example
SDL_zero(level);See this code run in Platformer. Download the full program (.zip)
In SDL2
The name is the same.