摘要: 任务4 1 #include <iostream> 2 #include "Vector.hpp" 3 4 void test() { 5 using namespace std; 6 7 int n; 8 cin >> n; 9 10 Vector<double> x1(n); 11 for (a 阅读全文
posted @ 2023-12-17 22:54 袁德聪 阅读(14) 评论(0) 推荐(0)
摘要: 任务3 1 #include<iostream> 2 #include<string> 3 using namespace std; 4 5 class MachinePets { 6 public: 7 MachinePets(const string& s); 8 MachinePets(); 阅读全文
posted @ 2023-12-03 20:48 袁德聪 阅读(27) 评论(0) 推荐(0)
摘要: 任务5 1 #include <iostream> 2 #include <string> 3 using namespace std; 4 5 class TextCoder { 6 public: 7 TextCoder() = default; 8 TextCoder(string str); 阅读全文
posted @ 2023-11-30 20:30 袁德聪 阅读(28) 评论(0) 推荐(0)
摘要: 任务1 1 #pragma once 2 #include <iostream> 3 using std::cout; 4 using std::endl; 5 class Point { 6 public: 7 Point(int x0 = 0, int y0 = 0); 8 ~Point() = 阅读全文
posted @ 2023-11-05 20:49 袁德聪 阅读(31) 评论(0) 推荐(0)
摘要: 实验任务三 1 #include <iostream> 2 #include <cmath> 3 4 class Complex { 5 6 private: 7 double real; 8 double imag; 9 10 public: 11 Complex(double r = 0, do 阅读全文
posted @ 2023-10-22 23:10 袁德聪 阅读(20) 评论(0) 推荐(0)
摘要: // 标准库string, vector, array基础用法 #include <iostream> #include <string> #include <vector> #include <array> // 函数模板 // 对满足特定条件的序列类型T对象,使用范围for输出 template 阅读全文
posted @ 2023-10-20 00:16 袁德聪 阅读(40) 评论(0) 推荐(0)