会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
sjc666
博客园
首页
新随笔
联系
订阅
管理
2024年12月17日
实验6 模板类、文件I/O和异常处理
摘要: 任务4 Vector.hpp 1 #pragma once 2 3 #include <iostream> 4 #include <stdexcept> 5 6 using namespace std; 7 8 template<typename T> 9 class Vector { 10 pub
阅读全文
posted @ 2024-12-17 17:09 shorekeeper
阅读(10)
评论(0)
推荐(0)
2024年12月3日
实验5 继承和多态
摘要: 任务3 pets.hpp 1 #include<iostream> 2 #include<string> 3 4 using std::cout; 5 using std::endl; 6 using std::string; 7 8 class MachinePets { 9 public: 10
阅读全文
posted @ 2024-12-03 17:22 shorekeeper
阅读(27)
评论(0)
推荐(0)
2024年11月19日
类的组合、继承、模板类、标准库
摘要: 任务2 GradeCalc.hpp 1 #include <iostream> 2 #include <vector> 3 #include <string> 4 #include <algorithm> 5 #include <numeric> 6 #include <iomanip> 7 8 u
阅读全文
posted @ 2024-11-19 15:40 shorekeeper
阅读(28)
评论(0)
推荐(0)
2024年11月5日
实验3 类和对象_基础编程2
摘要: 任务1 button.hpp 1 #pragma once 2 3 #include <iostream> 4 #include <string> 5 6 using std::string; 7 using std::cout; 8 9 // 按钮类 10 class Button { 11 pu
阅读全文
posted @ 2024-11-05 15:37 shorekeeper
阅读(19)
评论(0)
推荐(0)
2024年10月23日
实验2 类和对象
摘要: 任务1 t.h 1 #pragma once 2 3 #include <string> 4 5 // 类T: 声明 6 class T { 7 // 对象属性、方法 8 public: 9 T(int x = 0, int y = 0); // 普通构造函数 10 T(const T &t); /
阅读全文
posted @ 2024-10-23 22:42 shorekeeper
阅读(49)
评论(0)
推荐(0)
2024年10月9日
实验1 现代C++编程初体验
摘要: 任务1 task1.cpp 1 // 现代C++标准库、算法库体验 2 // 本例用到以下内容: 3 // 1. 字符串string, 动态数组容器类vector、迭代器 4 // 2. 算法库:反转元素次序、旋转元素 5 // 3. 函数模板、const引用作为形参 6 7 #include <i
阅读全文
posted @ 2024-10-09 21:39 shorekeeper
阅读(20)
评论(0)
推荐(0)
公告