I have a database containing names (string) and price (double) values.
In xcode I created a view controller containing a mutable array.
Then to add names and price in the array I have the code
viewController *vc = [[viewController alloc] init];
vc.name =[NSString stringWithUTF8String:(char *) sqlite3_column_text(sqlStatement,0)];
vc.price=sqlite3_column_double(sqlStatement,1);
The vc.name line works fine but at sqlite3_column_double I get the following error:
Assigning to ‘double *’ from incompatible type ‘double’.
I have used sqlite3_column_double because for integers I use sqlite3_column_int.
Must I use something else for double type?
Looks like you have declared your view controller as:
You obviously meant
double priceand notdouble *price.