C language: is double parse exist? : <p>So i have this string:</p>

<pre><code>1, 3.8  , 4.0 , 2 e
</code></pre>

<p>And this function that split my <code>string</code> with <code>comma</code> and <code>tab</code> and print my numbers:</p>

<pre><code>void readuserinput(char *ch)
{
    ch = strtok(ch, ", \t");
    char *ptr;
    double ret;
    while (ch)
    {
        ret = strtod(ch, &amp;ptr);
        double d = atof(ch);
        printf("%f", d);
        ch = strtok(NULL, ", \t");
    }
}
</code></pre>

<p>So in case i have non number for example <code>e</code>, any chance to check it and in case this is not number print error ?</p>

<p>Is C Language have <code>double</code> parse or something like that ?</p>
