xcode NSMutableArray sqlite3\u列\u双精度

xcode NSMutableArray sqlite3\u列\u双精度,xcode,uiviewcontroller,sqlite,nsmutablearray,double,Xcode,Uiviewcontroller,Sqlite,Nsmutablearray,Double,我有一个包含名称(字符串)和价格(双精度)值的数据库。 在xcode中,我创建了一个包含可变数组的视图控制器。 然后在数组中添加名称和价格,我有代码 viewController *vc = [[viewController alloc] init]; vc.name =[NSString stringWithUTF8String:(char *) sqlite3_column_text(sqlStatement,0)]; vc.price=sqlite3_column_double(sqlSt

我有一个包含名称(字符串)和价格(双精度)值的数据库。 在xcode中,我创建了一个包含可变数组的视图控制器。 然后在数组中添加名称和价格,我有代码

viewController *vc = [[viewController alloc] init];
vc.name =[NSString stringWithUTF8String:(char *) sqlite3_column_text(sqlStatement,0)];
vc.price=sqlite3_column_double(sqlStatement,1);
vc.name行工作正常,但在sqlite3\u column\u double处,我得到以下错误:
从不兼容的类型“double”分配给“double*”。 我使用了sqlite3\u column\u double,因为对于整数,我使用sqlite3\u column\u int。

我必须为双重类型使用其他内容吗?

看起来您已将视图控制器声明为:

@interface viewController : UIViewController
{
    NSString *name;
    double *price
}
...
@end

很明显,你的意思是双倍价格,而不是双倍价格,天啊,我刚开始把它作为NSNumber,改成双倍后忘记删除了,真是愚蠢的粗心。非常感谢