Re: why debug step by step, it s ok
- From: "Emmanuel Delahaye" <emdel@xxxxxxxxxxxxxx>
- Date: Fri, 03 Jun 2005 17:12:39 +0200
baumann@pan wrote on 03/06/05 :
#include <stdio.h> #include <string.h>
int main() { char *buf="5/90/45";
char buf[]="5/90/45";
char *token; char *lasts;
printf("tokenizing \"%s\" with strtok():\n", buf); if ((token = strtok(buf, "/")) != NULL) { printf("token = \"%s\"\n", token); while ((token = strtok(NULL, "/")) != NULL) { printf("token = \"%s\"\n", token); } } }
strings are not mutable...
-- Emmanuel The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html The C-library: http://www.dinkumware.com/refxc.html
"Mal nommer les choses c'est ajouter du malheur au monde." -- Albert Camus.
.
- Follow-Ups:
- Re: why debug step by step, it s ok
- From: Robert Gamble
- Re: why debug step by step, it s ok
- References:
- why debug step by step, it s ok
- From: baumann@pan
- why debug step by step, it s ok
- Prev by Date: Re: Bit twiddling
- Next by Date: Re: why debug step by step, it s ok
- Previous by thread: Re: why debug step by step, it s ok
- Next by thread: Re: why debug step by step, it s ok
- Index(es):