fclose() causing segmentation fault
问题 I have a tab-delimited text file that I am parsing. Its first column contains strings of the format chrX , where X denotes a set of strings, e.g., "1", "2", ..., "X", "Y". These are each stored in a char* called chromosome , as the file is parsed. The text file is sorted on the first column lexicographically, i.e., I will have a number of rows starting with "chr1", and then "chr2", etc. At each "chrX" entry, I need to open another file that is associated with this entry: FILE *merbaseIn; //