摘要: 实验四 vector.hpp #pragma once #include <iostream> using namespace std; template<typename T> class Vector { public: Vector(int n) :size{ n } { p = new T[ 阅读全文
posted @ 2022-12-06 18:31 魏泽炜 阅读(6) 评论(0) 推荐(0) 编辑
摘要: task4 pets.hpp #pragma once #include<iostream> #include<string> using namespace std; class MachinePets{ public: MachinePets(string s):nickname{s}{}; s 阅读全文
posted @ 2022-11-27 15:30 魏泽炜 阅读(12) 评论(0) 推荐(0) 编辑
摘要: vectorInt.hpp #pragma once #include<iostream> #include<cassert> using namespace std; class vectorInt{ public: vectorInt(int n); vectorInt(int n,int va 阅读全文
posted @ 2022-11-06 20:17 魏泽炜 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 实验任务5 Info.hpp #include<iostream> using namespace std; class Info{ public: Info()=default; Info(string name0,string email0,string city0,int n0):nickna 阅读全文
posted @ 2022-10-25 21:41 魏泽炜 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 实验4 hpp #pragma once #include <iostream> #include <string> #include <cmath> using namespace std; class Complex{ public: Complex(): real{0}, imag{0} { 阅读全文
posted @ 2022-10-18 20:43 魏泽炜 阅读(15) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <string> #include <vector> int main() { using namespace std; string s1; // 创建一个string对象 string s2{"c plus plus"}; // 创建一个 阅读全文
posted @ 2022-09-29 09:23 魏泽炜 阅读(8) 评论(2) 推荐(0) 编辑