From a03816979c3197da6ee029306eb4c937a18c26f8 Mon Sep 17 00:00:00 2001 From: JiuMu3 <125326996+JiuMu3@users.noreply.github.com> Date: Wed, 25 Sep 2024 21:28:51 +0800 Subject: [PATCH] Update stdcpy.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 应当为fopen --- ch15/stdcpy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ch15/stdcpy.c b/ch15/stdcpy.c index c4fbc3f..ea523ba 100644 --- a/ch15/stdcpy.c +++ b/ch15/stdcpy.c @@ -7,8 +7,8 @@ int main(int argc, char *argv[]) FILE *fp2; char buf[BUF_SZIE]; - fp1 = open("news.txt", "r"); - fp2 = open("cpy.txt", "w"); + fp1 = fopen("news.txt", "r"); + fp2 = fopen("cpy.txt", "w"); while (fgets(buf, BUF_SZIE, fp1) != NULL) fputs(buf, fp2);