会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
xlhc
博客园
首页
新随笔
联系
订阅
管理
2023年12月17日
实验6 模板类、文件I/O和异常处理
摘要: 实验任务4 1 #define VECTOR_HPP 2 #include <iostream> 3 #include <stdexcept> 4 using namespace std; 5 template <typename T> 6 class Vector { 7 private: 8 T
阅读全文
posted @ 2023-12-17 08:59 春满城
阅读(22)
评论(0)
推荐(0)
2023年12月3日
实验5 继承和多态
摘要: 实验任务3 1 #include<iostream> 2 #include<string> 3 using namespace std; 4 class MachinePets 5 { 6 private: 7 string nickname; 8 public: 9 MachinePets(con
阅读全文
posted @ 2023-12-03 23:42 春满城
阅读(34)
评论(0)
推荐(0)
2023年11月30日
实验4 现代C++标准库与类模板
摘要: 实验任务5 1 #include <iostream> 2 #include <string> 3 using namespace std; 4 class TextCoder 5 { 6 public: 7 TextCoder() = default; 8 TextCoder(string str
阅读全文
posted @ 2023-11-30 23:43 春满城
阅读(17)
评论(0)
推荐(0)
2023年11月6日
实验3 类与数组、指针
摘要: 实验任务1 point.hpp 1 #pragma once 2 #include <iostream> 3 using std::cout; 4 using std::endl; 5 class Point 6 { 7 public: 8 Point(int x0 = 0, int y0 = 0)
阅读全文
posted @ 2023-11-06 00:57 春满城
阅读(22)
评论(0)
推荐(0)
2023年10月23日
实验2 类和对象
摘要: 实验任务1 t.h 1 #ifndef T_H 2 #define T_H 3 #include <iostream> 4 #include <string> 5 using namespace std; 6 class T 7 { 8 public: 9 T(int x=0,int y=0); 1
阅读全文
posted @ 2023-10-23 01:00 春满城
阅读(26)
评论(0)
推荐(0)
2023年10月19日
实验1 类和对象
摘要: 实验任务一: 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <array> 5 template<typename T> 6 void output1(const T &obj) 7 { 8 for(
阅读全文
posted @ 2023-10-19 23:24 春满城
阅读(14)
评论(0)
推荐(0)
公告