会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
sqmylc
博客园
首页
新随笔
联系
订阅
管理
2024年12月16日
实验六 模板类,文件I/O和异常处理
摘要: 任务4 代码: Vector.hpp: 1 #pragma once 2 #include<iostream> 3 #include<stdexcept> 4 #include<cmath> 5 6 using namespace std; 7 8 template<typename T> 9 cl
阅读全文
posted @ 2024-12-16 17:15 霍学金
阅读(28)
评论(0)
推荐(0)
2024年12月2日
实验五 继承和多态
摘要: 实验一: 代码: publisher.hpp: 1 #pragma once 2 3 #include<iostream> 4 #include<string> 5 6 using std::cout; 7 using std::endl; 8 using std::string; 9 10 cla
阅读全文
posted @ 2024-12-02 18:42 霍学金
阅读(41)
评论(0)
推荐(0)
2024年11月18日
实验四 类的组合、继承、模板类、标准库
摘要: 实验一 task1_1.cpp: 1 #include<iostream> 2 3 using std::cout; 4 using std::endl; 5 6 class A { 7 public: 8 A(int x0, int y0); 9 void display()const; 10 1
阅读全文
posted @ 2024-11-18 18:53 霍学金
阅读(27)
评论(0)
推荐(0)
2024年11月5日
实验3 类和对象_基础编程2
摘要: 实验一: 代码: 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 {
阅读全文
posted @ 2024-11-05 19:49 霍学金
阅读(23)
评论(0)
推荐(0)
2024年10月23日
实验2 类和对象_基础编程1
摘要: 实验任务1 代码: t.h: 1 #pragma once 2 3 #include<string> 4 5 class T { 6 public: 7 T(int x = 0, int y = 0); 8 T(const T& t); 9 T(T&& t); 10 ~T(); 11 void ad
阅读全文
posted @ 2024-10-23 18:52 霍学金
阅读(42)
评论(0)
推荐(0)
2024年10月10日
实验1 现代c++编程初体验
摘要: 任务1: task1.cpp 1 // 现代C++标准库、算法库体验 2 // 本例用到以下内容: 3 // 1. 字符串string, 动态数组容器类vector、迭代器 4 // 2. 算法库:反转元素次序、旋转元素 5 // 3. 函数模板、const引用作为形参 6 7 #include <
阅读全文
posted @ 2024-10-10 20:17 霍学金
阅读(13)
评论(0)
推荐(0)
公告