摘要: 实验任务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)
摘要: 实验任务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)
摘要: 实验任务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)
摘要: 实验任务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)
摘要: 实验任务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)
摘要: 试验任务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)