我有一个 SQLite 数据库,其中包含一些 double 类型的字段,我必须提取此值并将它们放入实例变量中,但出现此错误
Assigning to 'double *' from incompatible type 'double'
这是代码:
数据库表.h
@interface DatabaseTable : NSObject {
sqlite3 * database;
}
//........
@property (nonatomic, assign)double *latitude; //latitude is a field of type double
@property (nonatomic, assign)double *longitude; //longitude is a field of a type double
@end
数据库表.m
//.....
while (sqlite3_step(statement) == SQLITE_ROW) {
DatabaseTable * rowTable =[[ChinaDatabaseTable alloc]init];
//.......
rowTable.latitude =sqlite3_column_double(statement, 15); //here the error
rowTable.longitude =sqlite3_column_double(statement, 16);//here the error
//.....
}
我能做些什么?