摘要: 实验任务三 #include <iostream> #include <fstream> #include <array> #define N 5 int main() { using namespace std; array<int, N> x {97, 98, 99, 100, 101}; of 阅读全文
posted @ 2022-12-03 18:55 小樊_1973 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 实验任务4 #pragma once #include<iostream> #include<string> using namespace std; class MachinePets{ public: string nickname ; MachinePets(const string s):n 阅读全文
posted @ 2022-11-26 19:35 小樊_1973 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 实验任务5 #pragma once #include<iostream> #include<cassert> using namespace std; class vectorInt{ public: vectorInt(int n):size{n} { p=new int[size]; cout 阅读全文
posted @ 2022-11-05 08:10 小樊_1973 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 任务5 #pragma once #include<iostream> #include<string> #include<iomanip> using namespace std; class Info{ public: Info(string name,string cot,string cty 阅读全文
posted @ 2022-10-24 10:55 小樊_1973 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 实验任务4 #pragma once #include<iostream> #include<cmath> using namespace std; //定义Complex类 class Complex{ public: Complex(double r=0,double i=0):real{r}, 阅读全文
posted @ 2022-10-16 18:54 小樊_1973 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 任务2:// Point类 // 相较于教材,在构造函数的写法上,采用了业界更通用的初始化列表方式 #include <iostream> using std::cout; using std::endl; // 定义Point类 class Point { public: Point(int x0 阅读全文
posted @ 2022-09-29 20:41 小樊_1973 阅读(5) 评论(0) 推荐(0) 编辑