Is there a way to cut strings? If I have
char wholestring[60];
char partone[30];
char parttwo[30];
strcpy (wholestring, "begin part end part"
is there a way to cut the string so that I have partone = "begin part" and parttwo = "end part"?
Also, I want to use the second space (" " as a divider. So in another case where you have
strcpy(wholestring, "Sacramento Richardson Montreal Vancouver"
I would want
partone = "Sacramento Richardson"
parttwo = "Montreal Vancouver"
regards,
Hiro
char wholestring[60];
char partone[30];
char parttwo[30];
strcpy (wholestring, "begin part end part"
is there a way to cut the string so that I have partone = "begin part" and parttwo = "end part"?
Also, I want to use the second space (" " as a divider. So in another case where you have
strcpy(wholestring, "Sacramento Richardson Montreal Vancouver"
I would want
partone = "Sacramento Richardson"
parttwo = "Montreal Vancouver"
regards,
Hiro