I need convert ‘field’ in float type. How can do?
char *field = (char *) sqlite3_column_text(statment, 1);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming that the floating point value is stored in a string column, you can use the
sqlite3_column_doublefunction of SQLite:SQLite will do an automatic conversion for you, but using a column of a floating-point type would be a better choice.