首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

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

2012-03-28 
求教各位,为什么在Win-TC下 fopen打不开文件呢???STU * open(STU *head){FILE *pFileSTU *lastSTU *temp

求教各位,为什么在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;
}


[解决办法]
路径不对

热点排行