extracting part of a string???
Posted on 2003-02-19
I've got a function:
int func(char*whole, char*locator)
What I'm wanting inside this function, is for the string 'whole' to be searched for the string variable 'locator' and for the string to be extracted up until the locator is reached and put into a variable. I've tried the following with no success:
int examiner(char *whole, char *locator)
char *V1, compostemp;
compostemp = strchr(line,locator);
compos = atoi(compostemp);
cout << V1 <<endl;
Although that's just a mess... :) Can anybody do a bit of intervening?