为何fopen(path,"w")总是返回NULL?等

为何fopen(path,"w")总是返回NULL?在线等啊等~
不同的目录我都试过,路径里面也是用的“\\”;
文件已经创建了,可是还是返回的NULL,
[code=C/C++][/code]
void wFile_time(char * name,double * time_record,int len)
{
/*对记录的时间进行文件输出
name为文件名,time_record为记录的时间数组,len为记录数量
需先
*/
FILE * fout;
fout=fopen("c:\\abc.dat","wb");
printf("errno is: %d\n",errno);
for(int i=0;i<len;i++)
fprintf(fout,"%f\n",time_record[i]);
fclose(fout);
}

------解决方案--------------------
path路径不对呗
------解决方案--------------------
做个保护更安全

C/C++ code

void wFile_time(char * name,double * time_record,int len)
{
/*对记录的时间进行文件输出
name为文件名,time_record为记录的时间数组,len为记录数量
需先
*/
FILE * fout;
fout=fopen("c:\\abc.dat","wb");
if (NULL == fout)
{
    printf("errno is: %d\n",errno);
    return;
}
for(int i=0;i<len;i++)
fprintf(fout,"%f\n",time_record[i]);
fclose(fout);
}