Hey all. Trying to search through a text file and recognize when I hit an 'M', but it continues to read through the entire file. What am I missing?
Code:while (x = fgetc(fp) != EOF) { fseek(fp, (sizeof(char)*offset), SEEK_SET); if (x == 'M') { break; } printf("x = %c at pos %ld\n", fgetc(fp), ftell(fp)); offset++; }