3 ms·
Can you provide an example? Not 100% sure in which context you are talking about.
by harrytuttle 13y ago
Can you provide an example? Not 100% sure in which context you are talking about.
- ygra 13y agoAs 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 :)