谁能够详细解释一下这个函数,看不懂
void ReadDat(){
FILE *fp;
char str[80], ch[11];
int i;
fp = fopen("IN3.DAT", "r");
for (i = 0; i < 100; i++)
{
fgets(str, 80, fp);
memcpy(sell[i].dm, str, 4);
memcpy(sell[i].mc, str + 4, 10);
memcpy(ch, str + 14, 4); ch[4] = 0;
sell[i].dj = atoi(ch);
memcpy(ch, str +18, 5); ch[5] = 0;
sell[i].sl = atoi(ch);
sell[i].je = (long)sell[i].dj * sell[i].sl;
}
fclose(fp);
}