digitalzero
03-18-2002, 10:15 AM
say i have variables: line, token
where line: line with delim
token: token of line
all of type char *
now then i have type char variable named del
char del;
del = ',';
how do i use the strtok?
this is what i've tried:
token = strtok(line,&delim);
it compiles alrite, but when i run something like: "hello,hello"
ERROR: Segmentation Fault
Is it my syntax thats wrong? Someone help!
[ 18 March 2002: Message edited by: digitalzero ]
where line: line with delim
token: token of line
all of type char *
now then i have type char variable named del
char del;
del = ',';
how do i use the strtok?
this is what i've tried:
token = strtok(line,&delim);
it compiles alrite, but when i run something like: "hello,hello"
ERROR: Segmentation Fault
Is it my syntax thats wrong? Someone help!
[ 18 March 2002: Message edited by: digitalzero ]