随笔分类 -  C++实验

摘要:实验二 Person.hpp 1 #include<iostream> 2 #include<string> 3 4 using namespace std; 5 6 class Person{ 7 public: 8 Person(){}; 9 Person(string n, string t, 阅读全文
posted @ 2021-12-08 21:47 颜嘉震 阅读(141) 评论(4) 推荐(0)
摘要:实验二 1 #include <iostream> 2 #include <typeinfo> 3 4 // definitation of Graph 5 class Graph 6 { 7 public: 8 void draw() { std::cout << "Graph::draw() : 阅读全文
posted @ 2021-11-22 19:22 颜嘉震 阅读(107) 评论(3) 推荐(0)
摘要:vector_int.hpp 1 #include<iostream> 2 3 using namespace std; 4 5 class vector_int 6 { 7 public: 8 vector_int(int n, int number = 0); 9 vector_int(vect 阅读全文
posted @ 2021-11-01 17:16 颜嘉震 阅读(23) 评论(3) 推荐(0)
摘要:info.hpp 1 #include<iostream> 2 #include<string> 3 4 using namespace std; 5 6 class Info 7 { 8 public: 9 Info(string ni = "", string co = "", string c 阅读全文
posted @ 2021-10-25 20:47 颜嘉震 阅读(57) 评论(3) 推荐(0)
摘要:实验任务三 // Complex.hpp 1 #include<iostream> 2 #include<cmath> 3 using namespace std; 4 5 class Complex 6 { 7 public: 8 Complex(double r = 0, double m = 阅读全文
posted @ 2021-10-19 17:11 颜嘉震 阅读(125) 评论(4) 推荐(0)