我想通过我的sqlite数据库通过功能,然后再通过到另一个。这是我的代码。Sqlite通过函数传递数据库
//database Name
// Create a handle for database connection, create a pointer to sqlite3
sqlite3 *dataDB;
//I send it through to the function here
// Execute the query for creating table
retval = sqlite3_exec(dataDB,create_students,0,0,0);
我的原型:
int readInFiles(sqlite3 ** dataDB);
void addCourse(sqlite3 ** dataDB, struct course,int k);
呼叫从readInFiles
函数中:
addCourse(&dataDB,deg,k);
这是我的错误:
"database.c", line 50: warning: argument #1 is incompatible with prototype:
prototype: pointer to pointer to struct sqlite3 {} : "database.h", line 51
如果我误解了代码中的注释,请回滚我的编辑。 – Mat 2012-04-29 13:17:41