摘要: 任务4 #include <iostream> #include <stdexcept> #include <stdlib.h> template <typename T> class Vector { public: friend void output(const Vector<T1> &v); 阅读全文
posted @ 2023-12-16 22:12 方艺博 阅读(27) 评论(0) 推荐(0)
摘要: 任务3 1 #include<iostream> 2 #include<stdlib.h> 3 #include<string> 4 using namespace std; 5 class MachinePets 6 { 7 private: 8 string nickname; 9 public 阅读全文
posted @ 2023-12-04 00:08 方艺博 阅读(26) 评论(0) 推荐(0)
摘要: 任务5 #include <iostream> #include <string> class TextCoder { private: std::string text; void encoder() { for (char &c : text) { if (isalpha(c)) { char 阅读全文
posted @ 2023-12-01 02:51 方艺博 阅读(31) 评论(0) 推荐(0)
摘要: 实验任务1 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 = 0, int y0 = 0); 10 ~Po 阅读全文
posted @ 2023-11-06 01:02 方艺博 阅读(36) 评论(0) 推荐(0)
摘要: 实验任务3 complex.hpp 1 # include<iostream> 2 # include<cmath> 3 4 class Complex{ 5 public: 6 Complex(double r = 0, double i = 0){ 7 real = r; 8 imag = i; 阅读全文
posted @ 2023-10-23 00:44 方艺博 阅读(26) 评论(0) 推荐(0)
摘要: 实验任务1 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <array> 5 // 函数模板 6 // 对满足特定条件的序列类型T对象,使用范围for输出 7 template<typename T> 阅读全文
posted @ 2023-10-20 00:02 方艺博 阅读(35) 评论(0) 推荐(0)