摘要:
double string2Double(char *str){ double result = 0.0; int dotDist = 0; while (isdigit(*str) || *str == '.) { if (*str == '.') { if (dotDist == 0) { dotDist = 1; } else { return result; } } else { if (dotDist == 0) { result = result * 10 + (*str - '0'); ... 阅读全文
posted @ 2012-09-03 15:44
lightex
阅读(367)
评论(0)
推荐(0)