From ddcc4e77950d9ff4e65f6918b23649d6923a4505 Mon Sep 17 00:00:00 2001 From: Xiaoxuan <146991491+XiaoxuanLi35@users.noreply.github.com> Date: Wed, 19 Feb 2025 17:11:42 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BA=A4=E6=8D=A2=E6=95=B0=E5=80=BC=E9=83=A8?= =?UTF-8?q?=E5=88=86=E7=9A=84int=20temp=E6=94=B9=E4=B8=BAchar=20temp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原代码: int tmp = s[i]; s[i] = s[j]; s[j] = tmp; s[i]为一个character而不是integer,所以tmp需要修改为char --- ...\217\215\350\275\254\345\255\227\347\254\246\344\270\262.md" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/problems/0344.\345\217\215\350\275\254\345\255\227\347\254\246\344\270\262.md" "b/problems/0344.\345\217\215\350\275\254\345\255\227\347\254\246\344\270\262.md" index 793c9af362..fb4fe4952d 100644 --- "a/problems/0344.\345\217\215\350\275\254\345\255\227\347\254\246\344\270\262.md" +++ "b/problems/0344.\345\217\215\350\275\254\345\255\227\347\254\246\344\270\262.md" @@ -93,7 +93,7 @@ swap可以有两种实现。 一种就是常见的交换数值: ```CPP -int tmp = s[i]; +char tmp = s[i]; s[i] = s[j]; s[j] = tmp;