why debug step by step, it s ok
- From: "baumann@pan" <baumann.Pan@xxxxxxxxx>
- Date: 3 Jun 2005 00:37:19 -0700
Hi all,
I have one simple program:
#define __EXTENSIONS__
#include <stdio.h>
#include <string.h>
int main() {
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);
}
}
}
the program has abused the strok, i know it,
******but why when i `gdb prog_name` and execute step by step , it 's
ok?
thanks
baumann@pan
.
- Follow-Ups:
- Re: why debug step by step, it s ok
- From: Barry Schwarz
- Re: why debug step by step, it s ok
- From: August Karlstrom
- Re: why debug step by step, it s ok
- From: Emmanuel Delahaye
- Re: why debug step by step, it s ok
- From: Michael Knaup
- Re: why debug step by step, it s ok
- From: Mark F. Haigh
- Re: why debug step by step, it s ok
- Prev by Date: Re: New to C
- Next by Date: Re: WAV file question
- Previous by thread: Returning pointer to array problem II
- Next by thread: Re: why debug step by step, it s ok
- Index(es):