摘要: 实验2: person.h #pragma once #include<iostream> #include<string> #include <iomanip> using namespace std; class Person { private: string name; string tel 阅读全文
posted @ 2021-12-13 15:04 社交废物 阅读(33) 评论(4) 推荐(0)
摘要: 任务2: #include <iostream> #include <typeinfo> class Graph { public: virtual void draw() { std::cout << "Graph::draw() : just as an interface\n"; } }; c 阅读全文
posted @ 2021-11-26 12:24 社交废物 阅读(45) 评论(3) 推荐(0)
摘要: 1.实现动态的整型数组类 vector.hpp: #pragma once #ifndef VECTOR_INT_HPP #define VECTOR_INT_HPP #include<iostream> class vector_int { private: int* p; int size; p 阅读全文
posted @ 2021-11-07 10:49 社交废物 阅读(24) 评论(2) 推荐(0)
摘要: info.hpp #pragma once #ifndef INFO_HPP #define INFO_HPP #include <iostream> #include<string> using namespace std; class Info { private: string nicknam 阅读全文
posted @ 2021-11-02 11:15 社交废物 阅读(27) 评论(3) 推荐(0)
摘要: 1.自定义complex类的实现 complex.hpp代码展示: #ifndef COMPLEX_H #define COMPLEX_H #include <iostream> #include <cmath> class complex { public: complex(double i = 阅读全文
posted @ 2021-10-25 14:12 社交废物 阅读(51) 评论(3) 推荐(0)