摘要: 一.实验任务1.3 1 #include<iostream> 2 using std::cout; 3 using std::endl; 4 using std::ostream; 5 using std::istream; 6 template <typename T> 7 class Compl 阅读全文
posted @ 2021-12-14 21:00 Beeatbonnie 阅读(67) 评论(3) 推荐(0)
摘要: 1.实验任务2 程序源码如下: 1 #include <iostream> 2 #include<typeinfo> 3 4 class Graph{ 5 public: 6 virtual void draw(){ 7 std::cout<<"Graph::draw():just as an in 阅读全文
posted @ 2021-11-28 10:56 Beeatbonnie 阅读(30) 评论(3) 推荐(0)
摘要: 恢复内容开始 一、实验任务4 动态int型数组类Vector_int的定义实现源码(vector_int.hpp) #pragma once #include<iostream> using namespace std; class Vector_int { public: Vector_int(i 阅读全文
posted @ 2021-11-07 15:22 Beeatbonnie 阅读(19) 评论(3) 推荐(0)
摘要: 实验五: 以下为Info.cpp文件源码 1 #include <string> 2 #include <iostream> 3 using namespace std; 4 class info { 5 private: 6 string nickname; 7 string contact; 8 阅读全文
posted @ 2021-10-29 10:51 Beeatbonnie 阅读(39) 评论(3) 推荐(0)
摘要: 1 #include <iostream> 2 #include <cmath> 3 4 class Complex 5 { 6 7 public: 8 Complex() {}; 9 Complex(double x) :real{ x }, imag{ 0 }{} 10 Complex(doub 阅读全文
posted @ 2021-10-24 09:30 Beeatbonnie 阅读(63) 评论(3) 推荐(0)