例如:
//---------构建列表----------------------------
NODE* buildList (char* fileID)
{
DATA data;
NODE* pList;
NODE* pPre;
NODE* pCur;
FILE* fpData;
pList = NULL;
fpData = fopen(fileID, "r"); //这一段没有看懂,fileID不是字符的指针么,为什么可以用来表示文件的路径?
if(!fpData)
{
printf("error.");
exit(210);
}
while (getData (fpData, &data))
{
searchList (pList, &pPre, &pCur, data.key);
pList = insertNode(pList, pPre, data);
}
return pList;
}