DRAFT |
SDL_SetError
Use this function to set the SDL error string.
Syntax
void SDL_SetError(const char* fmt,
...)
Function Parameters
fmt |
a printf() style message format string |
... |
additional parameters matching % tokens in the fmt string, if any |
Code Examples
SDL_SetError("Something unexpected happened!");
*
green
#include "SDL_error.h"
int main() {
char buffer[BUFSIZ+1];
SDL_memset(buffer, '1', BUFSIZ);
buffer[BUFSIZ] = 0;
SDL_SetError("This is the error: %s (%f)", buffer, 1.0);
printf("Error 1: %s\n", SDL_GetError());
}
*
Remarks
You can add useful comments here
