I've been working on this project that deals with an input file that looks like the following:

```
A 0.0345
B 0.3945
...
Z 0.2055

```

Basically, I'm reading each line, after reading the line, I want to pull **only** the double out of the string. I'm trying to use `strtod()` and everyone's examples seem to use it perfectly fine but in my example, it only returns 0.

Here is my code:

```
for (count = 0; count < 26; count++)
{
    char buffer[100]; /* Buffer for the line read by fgets */
    char *letters; /* Stores the string calculated by strtod */
    double relFreq = 0.0;

    if (fgets(buffer, 100, stream) != NULL)
    {
        relFreq = (double)strtod(buffer, &letters); /* Since the format is A 0.0000, we're just grabbing the double */
        *(sampleOne + count) = relFreq; /* Add the relFreq to the array */
    }
}

```

Through the use of a debugger, `buffer` has the correct data, for instance `A 0.0345\n` but when `strtod()` returns a value it's always 0. Any help would be appreciated!