char array to intiger

Hello,
I am getting from my gps array of chars in this format:

$GPGGA,161229.487,3723.2475,N,12158.3416,W,1,07,1.0,9.0,M,,,,0000*18

All I need are thous numbers:
deg1 = 37
min1 = 232475

deg2 = 12
min2 = 1583416

How do I convert some of the chars to integer?

Thank you.

I am getting from my gps array of chars

Can we see a bit of code to demonstrate this?

If you do indeed have an array of chars, the strtok function will allow you to extract tokens from the array ("GPGGA", "161229.487", "3723.2475", etc.).

You can use atoi and atof to convert the tokens to numbers.

Even easier, though, is to use the TinyGPS library that has already implemented the parsing for you.