this is\n what my\n char array\n looks like\n
I want to take it one line at a time and do a few string manipulations and if statements on it, then if they all aren't true, move on to the next line.
Suggestions?




Posted 09 October 2012 - 08:24 PM
this is\n what my\n char array\n looks like\n
Posted 09 October 2012 - 08:40 PM
Posted 09 October 2012 - 10:10 PM
char test[] = "abc$def$ghi$jkl$";
char *ptr = strtok(test, "$"); //parse at $
while(ptr) { //while token was found
printf("%s\n", ptr);
ptr = strtok(NULL, "$");
}
This post has been edited by jjl: 09 October 2012 - 10:14 PM
