#include
//#include
//#include
void
createfile (int *fd)
{
*fd = creat ("test.txt", 0700);
printf ("--->%d.\n", *fd);
if (*fd == -1)
{
perror ("创建失败.\n");
return;
}
else
printf ("创建成功.\n");
printf ("--->%d.\n", *fd);
}
int
main ()
{
int fd;
createfile (&fd);
printf ("--->%d.\n", fd);
return 0;
}
阅读(1368) | 评论(0) | 转发(0) |