C语言中关于文件的问题
下面是一个创建文件的源程序,但文件不能创建,为什么(是不是mktemp函数用得不对,还有其他的函数创建空文件吗)?
#include <dir.h>
#include <stdio.h>
int main(void)
{
/* fname defines the template for the
temporary file. */
char *fname = "TXXXXX", *ptr;
ptr=mktemp(fname);
printf("%s\n",ptr);
return 0;
}