Since this gets viewed a lot, even though it's old, I'll note for new programmers: this parsing code is technically correct but it is fragile: it will not tolerate any errors or variation in the nmea string and can crash for a variety of reasons. For example if any call to strtok_single() returns NULL, the strcpy will attempt to de-reference a null pointer (and crash). This will happen if any delimiter is not found. It's also better practice to use strncpy rather than strcpy for copying strings to avoid a potential buffer overrun.