mirror of
https://github.com/riba2534/TCP-IP-NetworkNote.git
synced 2026-11-06 15:27:49 +08:00
@@ -7,7 +7,7 @@ int main()
|
|||||||
int fd = open("data.dat", O_WRONLY | O_CREAT | O_TRUNC);
|
int fd = open("data.dat", O_WRONLY | O_CREAT | O_TRUNC);
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
{
|
{
|
||||||
fputs("file open error");
|
fputs("file open error",stdout);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ int main()
|
|||||||
printf("Second file descriptor: %d \n", fileno(fp)); //转回文件描述符
|
printf("Second file descriptor: %d \n", fileno(fp)); //转回文件描述符
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user