摘要: task3 //task3_1.cpp#include <iostream> #include <fstream> #include <array> #define N 5 int main() { using namespace std; array<int, N> x{ 97, 98, 99, 阅读全文
posted @ 2022-12-01 15:38 言黎小姐 阅读(10) 评论(0) 推荐(0) 编辑
摘要: task4代码: //pets.hpp #pragma once #include<iostream> using namespace std; class MachinePets { public: MachinePets(const string s) :nickname(s) {} virtu 阅读全文
posted @ 2022-11-27 23:06 言黎小姐 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 实验任务五代码截图: vectorInt.hpp: 1 #pragma once 2 3 #include<iostream> 4 #include<cassert> 5 using namespace std; 6 7 class vectorInt 8 { 9 public: 10 vector 阅读全文
posted @ 2022-11-06 15:08 言黎小姐 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 实验五代码: Info.hpp 1 #pragma once 2 3 #include<iostream> 4 #include<string> 5 #include<iomanip> 6 7 using std::string; 8 using std::cout; 9 using std::en 阅读全文
posted @ 2022-10-23 15:31 言黎小姐 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 任务四代码: Complex.hpp文件源码: 1 #pragma once 2 3 //Complex类的定义 4 #include<iostream> 5 #include<cmath> 6 7 using namespace std; 8 9 class Complex 10 { 11 pub 阅读全文
posted @ 2022-10-14 23:00 言黎小姐 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 任务二源代码: 1 //task2.cpp 2 3 #include<iostream> 4 using std::cout; 5 using std::endl; 6 7 //定义Point类 8 class Point 9 { 10 public: 11 Point(int x0=0,int y 阅读全文
posted @ 2022-09-29 23:50 言黎小姐 阅读(29) 评论(0) 推荐(0) 编辑