Hi to everyone.This is my first post to the sqlite-users postlist so i am sorry if i don't respect some rule. My question is about the sqlite3_exec() function.I have the following code :
typedef struct _object object; int main() { /* ... */ my_object *object; object =(my_object*) malloc (my_object); get_db(object); /* ... */ } int get_db(my_object *object) { int result; char *sql_statement; /*Open the sqlite3 database and prepare the SQL command*/ result = sqlite3_exec(db, sql_statement, db_callback, (void*)object, &zErrMsg); if( result!=SQLITE_OK ){...} sqlite3_close(db); return 0; } int db_callback(void* object,int n_columns,char** column_text,char** column_header) { object=(my_object*)object; object->name = strdup(column_text[2]); return 0; } And the message that i get from GCC is : file.c: 105:28: warning: pointer dereference 'void *' file.c: 105:28: error: request for member 'users_db_filename' in something not u na structure or union When i searched for this type of error i get that one of the causes is the use of "." operator instead of the "->" when trying to acces a pointer to a struct,but i don't think this is the case,right ? Thanks in advance for your time and i apology for any errors. Greetings from Spain Bogdan Gochev _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users