会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
ax5683ely
博客园
首页
新随笔
联系
订阅
管理
2025年12月2日
实验4 组合与继承
摘要: 实验任务1 运行结果截图如下 问题1 GradeCalc 类声明中,体现"组合"关系的成员声明及对应功能如下: std::vector<int> grades; grades用于存储所有成绩数据 std::array<int, 5> counts; counts用于统计各分数段人数 std::arr
阅读全文
posted @ 2025-12-02 20:51 勤垦原
阅读(3)
评论(0)
推荐(0)
2025年11月26日
实验3类和对象
摘要: 实验任务1 源代码如下: button.hpp #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label_); const std::string
阅读全文
posted @ 2025-11-26 00:36 勤垦原
阅读(10)
评论(1)
推荐(0)
2025年10月28日
实验二
摘要: 实验任务1 源代码 T.cpp #include "T.h" #include <iostream> #include <string> // 类T实现 // static成员数据类外初始化 const std::string T::doc{"a simple class sample"}; con
阅读全文
posted @ 2025-10-28 21:44 勤垦原
阅读(8)
评论(2)
推荐(0)
2025年10月17日
实验1 现代C++编程初体验
摘要: 1. 实验任务1 验证性实验。 在C++编码环境中,输入、运行并观察以下代码,结合运行结果和注释,体验使用C++标准库进行编程的便捷性。从面 向对象编程范式的角度,体会封装与基于接口编程的意义。 #include <iostream> #include <string> #include <vect
阅读全文
posted @ 2025-10-17 22:35 勤垦原
阅读(21)
评论(1)
推荐(1)
公告