Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

turn a char array into double C

double toDouble(const char* s, int start, int stop) {
    unsigned long long int m = 1;
    double ret = 0;
    for (int i = stop; i >= start; i--) {
        ret += (s[i] - '0') * m;
        m *= 10;
    }
    return ret;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #turn #char #array #double #C
ADD COMMENT
Topic
Name
9+6 =