Need help for reading a file character by character in C
问题 I have a question about reading a file character by character and counting it in C here's my code down below void read_in(char** quotes){ FILE *frp = fopen(IN_FILE, "r"); char c; size_t tmp_len =0, i=0; //char* tmp[100]; //char* quotes[MAX_QUOTES]; //char str = fgets(str, sizeof(quotes),frp); while((c=fgetc(frp)) != EOF){ if(frp == NULL){ printf("File is empty!"); fclose(frp); exit(1); } else{ if(c != '\n'){ printf("%c",c); c=fgetc(frp); tmp_len++; } } char* tmp = (char*)calloc(tmp_len+1,