reading input from text file into array of structures in c
问题 My structure definition is, typedef struct { int taxid; int geneid; char goid[20]; char evidence[4]; char qualifier[20]; char goterm[50]; char pubmed; char category[20]; } gene2go; I have tab-seperated text file called `"gene2go.txt". Each line of this file contains taxID , geneID , goID , evidence , qualifier , goterm , pubmed and category information. Each line of the file will be kept in a structure. When the program is run, it will first read the content of the input file into an array of