会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
xiaochengli
博客园
首页
新随笔
联系
订阅
管理
2023年12月16日
实验六 模板类、文件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 { 11
阅读全文
posted @ 2023-12-16 23:41 oacuiaka
阅读(30)
评论(0)
推荐(0)
2023年12月3日
实验5 继承和多态
摘要: 实验任务3 pets.hpp: 1 # pragma once 2 3 #include <iostream> 4 #include <string> 5 6 using namespace std; 7 8 class MachinePets{ 9 private: 10 string nickn
阅读全文
posted @ 2023-12-03 23:57 oacuiaka
阅读(16)
评论(0)
推荐(0)
2023年11月30日
实验4 现代c++标准库与类模板
摘要: 实验任务1 task1.cpp源码 task1_1.cpp: 1 #include <iostream> 2 3 using std::cout; 4 using std::endl; 5 6 //类A的定义 7 class A{ 8 public: 9 A(int x0, int y0): x{x
阅读全文
posted @ 2023-11-30 22:42 oacuiaka
阅读(22)
评论(0)
推荐(0)
2023年11月4日
实验三 类与数组、指针
摘要: 实验任务1 task1.cpp源码: Point.hpp: 1 #pragma once 2 3 #include <iostream> 4 using std::cout; 5 using std::endl; 6 7 class Point{ 8 public: 9 Point(int x0 =
阅读全文
posted @ 2023-11-04 23:05 oacuiaka
阅读(30)
评论(0)
推荐(0)
2023年10月22日
实验二 类和对象
摘要: 实验任务1 task1. cpp源码 t.h: 1 #ifndef T_H 2 #define T_H 3 4 #include <iostream> 5 #include <string> 6 7 using namespace std; 8 9 // 类T的声明 10 class T { 11
阅读全文
posted @ 2023-10-22 15:59 oacuiaka
阅读(35)
评论(0)
推荐(0)
2023年10月17日
实验1
摘要: 试验任务1 task1.cpp源码 // 标准库string, vector, array基础用法 #include <iostream> #include <string> #include <vector> #include <array> // 函数模板 // 对满足特定条件的序列类型T对象,
阅读全文
posted @ 2023-10-17 21:39 oacuiaka
阅读(47)
评论(0)
推荐(0)
公告