Here is what I have...
For some reason, when I check with the debugger, the variable c, does not change. The html[i], changes, but I don't understand why c does not change if it is always assigned a new character. Any help is appreciated.Code:#include <stdio.h> #include <stdlib.h> #include <time.h> #define SIZE 500000 int main(void) { int i = 0, b = 0, d = 0; FILE *fp1; fp1 = fopen("c:\\blah.html", "r"); char html[SIZE]; char url[150][512]; char c; int count = 0; fread(html, sizeof(char), SIZE, fp1); for (c = html[i]; c != sizeof(html); i++) { if (c == '\"') { count++; continue; } if (count == 1) { url[b][d] = c; printf("%c", url[b][d]); d++; } if (count == 2) { url[b][d] = '\0'; printf("\n"); b++; count = 0; } } fclose(fp1); return 0; }



LinkBack URL
About LinkBacks


