From 99dd590519928436a9573f5300881caeaf967c3c Mon Sep 17 00:00:00 2001 From: JiuMu3 <125326996+JiuMu3@users.noreply.github.com> Date: Wed, 25 Sep 2024 21:36:31 +0800 Subject: [PATCH] Update todes.c --- ch15/todes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ch15/todes.c b/ch15/todes.c index eed90ca..ef9a131 100644 --- a/ch15/todes.c +++ b/ch15/todes.c @@ -7,7 +7,7 @@ int main() int fd = open("data.dat", O_WRONLY | O_CREAT | O_TRUNC); if (fd == -1) { - fputs("file open error"); + fputs("file open error",stdout); return -1; } @@ -17,4 +17,4 @@ int main() printf("Second file descriptor: %d \n", fileno(fp)); //转回文件描述符 fclose(fp); return 0; -} \ No newline at end of file +}