摘要: #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-04 17:32 chenzhongbao 阅读(18) 评论(0) 推荐(0) 编辑
摘要: #pragma once #include<iostream> #include<string> using namespace std; class MachinePets { public: MachinePets(const string s):nickname(s){} string get 阅读全文
posted @ 2022-11-27 15:07 chenzhongbao 阅读(17) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using namespace std; class vectorint{ public: vectorint(int l=0){ size=l; cout<<"constructor 1 called\n"<<endl; p=new int[size]; } 阅读全文
posted @ 2022-11-05 19:35 chenzhongbao 阅读(8) 评论(0) 推荐(0) 编辑
摘要: #pragma once #include<iostream> #include<string> #include<vector> #include<iomanip> using namespace std; class info { public: info(string n1, string c 阅读全文
posted @ 2022-10-23 17:32 chenzhongbao 阅读(9) 评论(0) 推荐(0) 编辑
摘要: #pragma once #include<iostream> #include<math.h> using namespace std; class Complex { friend Complex add(const Complex& obj1, const Complex& obj2); fr 阅读全文
posted @ 2022-10-15 13:23 chenzhongbao 阅读(22) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using namespace std; class point{ public: point(int x0=0,int y0=0); point(const point&p); ~point()=default; int get_x() const { ret 阅读全文
posted @ 2022-09-28 18:22 chenzhongbao 阅读(16) 评论(0) 推荐(0) 编辑