摘要:
实验任务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 阅读全文
摘要:
实验任务4: pets.hpp: #include<iostream> using namespace std; class MachinePets{ public: MachinePets(const string s):nickname{s}{} virtual string talk()=0; 阅读全文
摘要:
实验任务5: vectorInt.hpp: #include<iostream> #include <cassert> using namespace std; class vectorInt{ public: vectorInt(int n); vectorInt(int n, int value 阅读全文
摘要:
实验任务5: info.hpp: #include<iostream> #include<string> using namespace std; class info{ public: info(string ni,string co,string ci,int n); void print(); 阅读全文
摘要:
4. 实验任务4 不使用C++标准库,自行设计并实现一个简化版复数类Complex。 Complex.hpp: #pragma once #include<iostream> #include<string> #include<iomanip> #include<cmath> using names 阅读全文
摘要:
实践任务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() 阅读全文