文件为什么读不出来?
请高手看一下该如何解决,
void sort(char c,char* infile,char* outfile)
{
Btree btree;
Llist lilist;
Sort_base *p=&btree,*q=&lilist;
FILE *fp;
fp=fopen(infile,"r");//到这里文件读不出来
if(!fp)exit(0);
if(c=='B')
{
p->add_data(fp);
p->output(outfile);
}
}
//the main function
int main(int argc,char*argv[])
{
char B,L;
sort(B,"c:\\dat.txt","c:\\out.txt");
}