会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
xuruize
博客园
首页
新随笔
联系
订阅
管理
2024年12月17日
实验6 模板类、文件I/O和异常处理
摘要: 实验内容4 Vector.hpp 1 #pragma once 2 #include<iostream> 3 #include<stdexcept> 4 5 using namespace std; 6 7 template<typename T> 8 9 class Vector { 10 pri
阅读全文
posted @ 2024-12-17 17:18 徐睿泽
阅读(22)
评论(0)
推荐(0)
2024年12月2日
实验5 继承和多态
摘要: 实验任务3 pets.hpp 1 #ifndef PETS_HPP 2 #define PETS_HPP 3 #include <string> 4 5 6 class MachinePets { 7 public: 8 MachinePets(const std::string s); 9 vir
阅读全文
posted @ 2024-12-02 22:19 徐睿泽
阅读(29)
评论(0)
推荐(0)
2024年11月21日
实验4 类的组合、继承、模板类、标准库
摘要: 实验任务1 task1_1.cpp #include <iostream> using std::cout; using std::endl; // 类A的定义 class A { public: A(int x0, int y0); void display() const; private: i
阅读全文
posted @ 2024-11-21 11:22 徐睿泽
阅读(33)
评论(0)
推荐(0)
2024年11月5日
实验3 类和对象_基础编程2
摘要: 实验任务1 bottom.hpp #pragma once #include <iostream> #include <string> using std::string; using std::cout; // 按钮类 class Button { public: Button(const str
阅读全文
posted @ 2024-11-05 19:06 徐睿泽
阅读(41)
评论(0)
推荐(0)
2024年10月28日
实验2 类和对象_基础编程1
摘要: 实验任务1 t.h源代码 // 类T: 声明 class T { // 对象属性、方法 public: T(int x = 0, int y = 0); // 普通构造函数 T(const T &t); // 复制构造函数 T(T &&t); // 移动构造函数 ~T(); // 析构函数 void
阅读全文
posted @ 2024-10-28 15:52 徐睿泽
阅读(22)
评论(0)
推荐(0)
2024年10月10日
实验1 现代C++基础编程
摘要: 任务1: 源代码task1.cpp 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <algorithm> 5 6 using namespace std; 7 8 template<typename
阅读全文
posted @ 2024-10-10 20:49 徐睿泽
阅读(58)
评论(0)
推荐(0)
公告