I am trying to parse a very large string one line at a time and then parse each individual line. I know the set up of the first line which is "HTTP/1.1 200 OK" and I am successfully able to use strtok() and read in the line. However, when I try to use sscanf to further parse this line I receive a seg. fault. Here is the code which I have.
or is there an easier way to do this?Code:dummy = strtok(message, "\n"); fprintf(stdout, "%s\n", dummy); sscanf(dummy, "%*s %s %*s", code); fprintf(stdout, "%s\n", code);