摘要: #include <iostream> #include <fstream> #include <array> #define N 5 int main() { using namespace std; array<int, N> x {97, 98, 99, 100, 101}; ofstream 阅读全文
posted @ 2022-12-06 22:08 戴鲁 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 实验四: #pragma once #include<iostream> #include<string> using namespace std; class MachinePets{ public: MachinePets(const string s0):nickname{s0} {} ~Ma 阅读全文
posted @ 2022-11-30 13:47 戴鲁 阅读(18) 评论(0) 推荐(0) 编辑
摘要: vectorInt.hpp#pragma once #include<iostream> #include<cassert> using namespace std; class vectorInt { public: vectorInt(int n); vectorInt(int n, int v 阅读全文
posted @ 2022-11-09 12:11 戴鲁 阅读(19) 评论(0) 推荐(0) 编辑
摘要: #pragma once #include<iostream> #include<string> #include<iomanip> #include<vector> using namespace std; class info{ public: info(string Name,string C 阅读全文
posted @ 2022-10-26 12:24 戴鲁 阅读(2) 评论(0) 推荐(0) 编辑
摘要: #pragma once #include <iostream> #include<math.h> class Complex { public: double get_real() { return real; } double get_imag()const { return imag; } C 阅读全文
posted @ 2022-10-18 19:34 戴鲁 阅读(2) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using std::cout; using std::endl; class point { public: point(int x0=0, int y0=0); point(const point &p); ~point()=default; int get 阅读全文
posted @ 2022-10-02 23:32 戴鲁 阅读(18) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <iomanip> using std::cout; using std::endl; class Clock { public: Clock(int h = 0, int m = 0, int s = 0); Clock(const Clo 阅读全文
posted @ 2022-10-02 23:23 戴鲁 阅读(3) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> class X{ public: X(); ~X() ; X(int m); X(const X& obj); X(X&& obj) noexcept; void show() const; private: int data; }; X::X(): data 阅读全文
posted @ 2022-10-02 23:23 戴鲁 阅读(1) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <iomanip> class rectangle{ public: rectangle(double l=2.00,double w=1.00):length{l },width{w} {}; rectangle(const rectang 阅读全文
posted @ 2022-10-02 23:22 戴鲁 阅读(3) 评论(0) 推荐(0) 编辑