I'm trying to get the count of the number of times Content-Type occurs in the data where I stated. I'm new at this and I can't seem to fingd something that's simple enough. Any suggestions are welcome. Code: [FONT=Courier New]void printRawData(unsigned char *data, int length, int more) { int i, c=0; printf(" -------------IP Data Begins-------------\n"); for (i=0; i<length; i++) { if ((data[i]>30 && data[i]<122) || (((data[i]==10) || (data[i]==13) || (data[i]==123) || (data[i]==125)) && (more>0))) { printf("%c", data[i]); ////////////////////////////////////////////////////// ////CODE HERE///////////////////// //////////////////////////////////////////////////// c+=1; } else { printf("[%i]", data[i]); c+=3; if (data[i]>9) c++; if (data[i]>99) c++; } if (c>=47) { printf("\n"); c=0; } } }[/FONT]
I know I'm new to the forums, but I think your question would be best answered in the Programming > C-C++ section. Having said that..I'll take a look at your problem when I'm more sober