Gast
#177903
Hallo, ich versuche einen string zu parsen, leider jedoch ohne Erfolg. Der Code ist angehängt. Der erste Teil ($GPGLL) wird korrekt abgeschnitten und der Pointer dummie zeigt auch darauf. Doch die weiteren Pointer zeigen irgendwohin, nur nicht auf den string. Laut Doku sollte diese Funktion aber schon so irgendwie funktionieren: "strtok_r parses the string s into tokens. The first call to strtok_r should have string as its first argument. Subsequent calls should have the first argument set to NULL. If a token ends with a delimiter, this delimiting character is overwritten with a '\0' and a pointer to the next character is saved for the next call to strtok_r. The delimiter string delim may be different for each call. last is a user allocated char* pointer. It must be the same while parsing the same string. strtok_r is a reentrant version of strtok(). The strtok_r() function returns a pointer to the next token or NULL when no more tokens are found." Kann mir irgendwer sagen warum das nicht geht?!? Vielen Dank