摘要: 实验任务3: task3_1: #include <iostream> #include <fstream> #include <array> #define N 5 int main() { using namespace std; array<int, N> x {97, 98, 99, 100 阅读全文
posted @ 2022-11-30 21:22 laver——枫 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 实验任务4: pets.hpp: #include<iostream> using namespace std; class MachinePets{ public: MachinePets(const string s):nickname{s}{} virtual string talk()=0; 阅读全文
posted @ 2022-11-29 19:39 laver——枫 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 实验任务5: vectorInt.hpp: #include<iostream> #include <cassert> using namespace std; class vectorInt{ public: vectorInt(int n); vectorInt(int n, int value 阅读全文
posted @ 2022-11-05 18:42 laver——枫 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 实验任务5: info.hpp: #include<iostream> #include<string> using namespace std; class info{ public: info(string ni,string co,string ci,int n); void print(); 阅读全文
posted @ 2022-10-24 22:48 laver——枫 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 4. 实验任务4 不使用C++标准库,自行设计并实现一个简化版复数类Complex。 Complex.hpp: #pragma once #include<iostream> #include<string> #include<iomanip> #include<cmath> using names 阅读全文
posted @ 2022-10-16 18:22 laver——枫 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 实践任务2: #include<iostream> using namespace std; class Point{ public: Point(int x0 = 0, int y0 = 0); Point(const Point&p); ~Point()=default; int get_x() 阅读全文
posted @ 2022-09-28 23:55 laver——枫 阅读(30) 评论(0) 推荐(0) 编辑