摘要: task3.cpp #include <iostream> #include <fstream> #include <array> #define N 5 int main() { using namespace std; array<int, N> x {97, 98, 99, 100, 101} 阅读全文
posted @ 2022-12-03 23:56 Molancci 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 实验任务4 程序源码 pets.hpp #pragma once #include<iostream> #include<string> using namespace std; class MachinePets{ public: MachinePets(const string &s); con 阅读全文
posted @ 2022-11-27 23:51 Molancci 阅读(26) 评论(0) 推荐(0) 编辑
摘要: task5 vectorint.hpp #pragma once #include<iostream> #include<cassert> using namespace std; class vectorint { public: vectorint(){}; vectorint(int n); 阅读全文
posted @ 2022-11-14 10:42 Molancci 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 实验任务5 info.hpp #pragma once #include<iostream> #include<string> #include<iomanip> using namespace std; class info { public: info(string name, string c 阅读全文
posted @ 2022-10-26 13:18 Molancci 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 实验任务4 task4.cpp #include "Complex.hpp" #include <iostream> // 类测试 void test() { using namespace std; Complex c1(1, -8); const Complex c2(6.4); Complex 阅读全文
posted @ 2022-10-19 00:44 Molancci 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 1.task2 #include<iostream>using std::cout;using std::endl; class Point{public: Point(int x0 = 0, int y0 = 0); Point(const Point&p); ~Point() = default 阅读全文
posted @ 2022-10-06 22:14 Molancci 阅读(10) 评论(0) 推荐(0) 编辑