摘要: task3-1.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-05 22:50 Wen~le 阅读(20) 评论(0) 推荐(0) 编辑
摘要: pets.hpp 1 #pragma once 2 #include<iostream> 3 using namespace std; 4 class MachinePets { 5 public: 6 string nickname; 7 MachinePets(const string s) : 阅读全文
posted @ 2022-11-24 16:42 Wen~le 阅读(35) 评论(0) 推荐(0) 编辑
摘要: matrix.hpp 1 #pragma once 2 #include <iostream> 3 using std::cout; 4 using std::endl; 5 class Matrix { 6 public: 7 Matrix(int n); // 构造函数,构造一个n*n的矩阵 8 阅读全文
posted @ 2022-11-05 11:41 Wen~le 阅读(12) 评论(0) 推荐(0) 编辑
摘要: task5 1 #include<iostream> 2 #include<vector> 3 #include<string> 4 #include<iomanip> 5 using namespace std; 6 class Info { 7 friend void print(vector< 阅读全文
posted @ 2022-10-24 17:20 Wen~le 阅读(25) 评论(0) 推荐(0) 编辑
摘要: task1.cpp 1 #include <iostream> 2 #include <complex> 3 int main() 4 { 5 using namespace std; 6 complex<double> c1{ 3, 4 }, c2{ 4.5 }; 7 const complex< 阅读全文
posted @ 2022-10-13 16:34 Wen~le 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 实验任务2: 1 // Point类 2 // 相较于教材,在构造函数的写法上,采用了业界更通用的初始化列表方式 3 #include <iostream> 4 using std::cout; 5 using std::endl; 6 // 定义Point类 7 class Point { 8 p 阅读全文
posted @ 2022-09-30 21:23 Wen~le 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 using namespace std; 3 int main() 4 { 5 cout<<"https://www.cnblogs.com/1916wenle/"<<endl; 6 return 0; 7 } 阅读全文
posted @ 2022-09-28 12:59 Wen~le 阅读(19) 评论(0) 推荐(0) 编辑