From 233b470060671ae86e435895e6f189b881d2eb16 Mon Sep 17 00:00:00 2001 From: newde Date: Fri, 6 Feb 2026 21:26:51 -0500 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E5=82=B3=E6=AA=94=E6=A1=88=E5=88=B0?= =?UTF-8?q?=E3=80=8C=E6=98=BE=E7=A4=BA=E6=95=B0=E7=BB=84=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 用函数来实现显示数据 --- 显示数组/showstr.cpp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 显示数组/showstr.cpp diff --git a/显示数组/showstr.cpp b/显示数组/showstr.cpp new file mode 100644 index 0000000..a81d70b --- /dev/null +++ b/显示数组/showstr.cpp @@ -0,0 +1,39 @@ +#include +#include +using namespace std; + +struct Harem +{ + int id; + int age; + string name; +}; + +void show(const Harem &hm) // ⭐ 类型必须写 +{ + cout <<" " <