hello
I have a program which is being passed 2 lines items at a time
To hold these lines i have 2 static pointers, these are:-
static char *first_string=NULL;
static char *second_string=NULL;
These 2 lines will contain data such as:-
A1|VALETING|LIMITED
A2|COMPANY|VALET|LTD
I then use strtok to move through each delimiter
first_ptr = strtok (first_string, "|,;-. ");
second_ptr = strtok (second_string, "|,;-. ");
first_ptr=strtok(first_ptr+strlen(first_ptr)+1, "|,;-. ");
second_ptr=strtok(second_ptr+strlen(second_ptr)+1, "|,;-. ");
This works fine, up to a certain stage, and then i get the following
Arithmetic Exception - Core dump.
Can anyone help? i am baffled?
Thanks