cannot convert 'const char*' to 'float'

I would like to convert GPS data which are const char example: 5020.37660 to float number but I have a problem. I used the code:

float latitude = atof(pdop.value());
float deg = (int) latitude; 
serial.print (deg);

Unfortunately it does not work in serial monitor shows 0
How to make this conversion work ?

Post your code, post your error messages.

Please post the entire sketch, and the link where you downloaded the GPS library.

As a test, your program should print out the contents of the presumed character array populated by pdop.value().

results from code below -- capitalized the "s" in serial.print

5020.37660
5020.00
const char *s = "5020.37660";

struct {
    const char *value () { return s; };
} pdop;

void
setup (void)
{
    Serial.begin (9600);

    Serial.println (pdop.value());

    float latitude = atof(pdop.value());
    float deg      = (int) latitude;
    Serial.print (deg);
}

void
loop (void)
{
}

gcjr Thanks a lot for the sketch it works great.

Maybe you can tell me how to do it.
instead of 5020.00 it was at exit 50203766

Please post the minimum sketch that demonstrates the error.

it was at exit 50203766

Nonsensical value.

Damian01:
instead of 5020.00 it was at exit 50203766

isn't 50203766 too large to be an integer (which is cast it to)

Is this another learning exercise or are you actually trying to initialize the variable, e.g.

    float latitude = 5020.37660;

?

You will certainly never get a const anything from a GPS.