4 ms·
As an example, SQLite: int sqlite3_exec( sqlite3*, /* An open database */ const char *sql,
by ygra 13y ago
As an example, SQLite:
int sqlite3_exec(
sqlite3*, /* An open database */
const char *sql, /* SQL to be evaluated */
int (*callback)(void*,int,char**,char**), /* Callback function */
void *, /* 1st argument to callback */
char **errmsg /* Error msg written here */
);
Here the void * is an argument that is passed in the callback as well so that you can update your own struct with the result, for example. Singe the library cannot know anything about your types, void * is the only option.
- harrytuttle 13y agoThanks for the example. Agree entirely then :)