sqlite有沒(méi)有把字符串轉(zhuǎn)成double型?
#include<stdio.h>double GetDouble(const char *a){ double b ; if(NULL == a) { return 0; } sscanf(a, "%lf", b); return b;}void main(){ char *a = "123.4567"; double b =GetDouble(a); printf("%lf\n", b);}
sqlite有沒(méi)有把字符串轉(zhuǎn)成double型?
#include<stdio.h>double GetDouble(const char *a){ double b ; if(NULL == a) { return 0; } sscanf(a, "%lf", b); return b;}void main(){ char *a = "123.4567"; double b =GetDouble(a); printf("%lf\n", b);}