Answers for "how to write data into a 2d char array in c"

C
0

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;
}
Posted by: Guest on June-09-2020

Code answers related to "C"

Browse Popular Code Answers by Language