摘要:
1.实验任务4 1 #include <iostream> 2 #include <stdexcept> 3 4 template <typename T> 5 class Vector { 6 private: 7 T* data; 8 size_t size; 9 public: 10 Vect 阅读全文
摘要:
实验任务3 1 #pragma once 2 #include <string> 3 #include <iostream> 4 5 class MachinePets { 6 public: 7 MachinePets(const std::string& s); 8 virtual ~Machi 阅读全文
摘要:
实验任务5 1 #include <iostream> 2 #include <string> 3 using namespace std; 4 5 class TextCoder { 6 private: 7 string text; 8 void encoder(); 9 void decode 阅读全文
摘要:
1.实验任务1 point.hpp 1 #include <iostream> 2 #include "point.hpp" 3 #include <vector> 4 using std::vector; 5 using std::cin; 6 // 输出vector<Point>对象内所有点的坐 阅读全文
摘要:
3.实验任务3 1 #pragma once 2 3 #include <iostream> 4 #include <cmath> 5 6 class Complex { 7 public: 8 Complex(double r = 0, double i = 0) : real(r), imag( 阅读全文
摘要:
实验任务1 源代码: 1 #include<iostream> 2 #include<string> 3 #include<vector> 4 #include<array> 5 6 7 template<typename T> 8 void output1(const T &obj){ 9 for 阅读全文