会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
yzsya
博客园
首页
新随笔
联系
订阅
管理
2023年12月17日
实验6 模板类、文件I/O和异常处理
摘要: 实验任务4 Vector.hpp #pragma once #include <iostream> #include <stdexcept>#include <string> using namespace std; template <typename T> class Vector { publ
阅读全文
posted @ 2023-12-17 21:16 yyy杨yyy
阅读(19)
评论(0)
推荐(0)
2023年12月3日
实验5 继承和多态
摘要: 实验任务3 pets.hpp #pragma once #include<iostream> #include<string> using namespace std; class MachinePets { private: string nickname; public: MachinePets
阅读全文
posted @ 2023-12-03 21:48 yyy杨yyy
阅读(14)
评论(0)
推荐(0)
2023年11月30日
实验4 现代C++标准库与类模板
摘要: 实验任务5 textcoder.hpp #program once #include<iostream> #include<string> using namespace std; class TextCoder{ private: string text; void encoder(); void
阅读全文
posted @ 2023-11-30 23:53 yyy杨yyy
阅读(20)
评论(0)
推荐(0)
2023年11月5日
实验3 类与数组、指针
摘要: 实验任务1 point.hpp #pragma once #include <iostream> using std::cout; using std::endl; class Point { public: Point(int x0 = 0, int y0 = 0); ~Point() = def
阅读全文
posted @ 2023-11-05 10:47 yyy杨yyy
阅读(19)
评论(0)
推荐(0)
2023年10月22日
实验2 类和对象
摘要: 实验任务3 t.hpp #pragma once #include <iostream> #include <cmath> using namespace std; class Complex{ public: Complex(); Complex(double real0); Complex(do
阅读全文
posted @ 2023-10-22 20:56 yyy杨yyy
阅读(20)
评论(0)
推荐(0)
2023年10月18日
实验1 类和对象
摘要: #include <iostream>#include <string> #include <vector> #include <array> template<typename T> void output1(const T &obj) { for(auto i: obj) std::cout <
阅读全文
posted @ 2023-10-18 23:40 yyy杨yyy
阅读(27)
评论(0)
推荐(0)
公告