SDL_SetError
Name
SDL_SetError -- sets the SDL error to a formatted string.
Synopsis
#include "SDL_error.h" void SDL_SetError(const char *fmt, ...);
Description
SDL_SetError sets the SDL error to a printf style formatted string.
Return Value
This is a void function and returns nothing.
Example
1 #include "SDL_error.h"
2
3 int main() {
4 char buffer[BUFSIZ+1];
5 SDL_memset(buffer, '1', BUFSIZ);
6 buffer[BUFSIZ] = 0;
7 SDL_SetError("This is the error: %s (%f)", buffer, 1.0);
8 printf("Error 1: %s\n", SDL_GetError());
9 }
