读书人

求教各位为什么在Win-TC下 fopen打不

发布时间: 2012-03-28 15:40:03 作者: rapoo

求教各位,为什么在Win-TC下 fopen打不开文件呢???

STU * open(STU *head)
{
FILE *pFile;
STU *last;
STU *temp;

last = head;

pFile = fopen(FILENAME,"r");

if (pFile == NULL)
{
return NULL;
}
while(!feof(pFile))
{
temp = CreateStu();
fscanf(pFile," %s %s %s %s %s\n",temp->name, temp->address, temp->mail, temp->tel);
last->next = temp;
last = last->next;
}

fclose(pFile);
return temp;
}


[解决办法]
路径不对

读书人网 >C语言

热点推荐