摘要: 1. 程序源码 task1 #include <iostream> #include <fstream> #include "Complex.hpp" void test1() { using namespace std; Complex<double> c1{1, 2}, c2; cout << 阅读全文
posted @ 2022-11-30 19:00 阑夜风华 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 1.实验任务1 task1_1 程序源码 #include <iostream> #include <map> #include <string> int main() { using namespace std; map<int, string> grade_dict{{5, "Excellent 阅读全文
posted @ 2022-11-25 14:58 阑夜风华 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 程序源码 point.hpp #pragma once #include <iostream> using std::cout; using std::endl; class Point { public: Point(): x{0}, y{0} {} Point(int x0, int 阅读全文
posted @ 2022-11-02 19:03 阑夜风华 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 1.实验任务1 程序源码 task1_1 #include <iostream> using std::cout; using std::endl; class A{ public: A(int x0, int y0): x{ x0 }, y{ y0 } {} void show() const { 阅读全文
posted @ 2022-10-21 14:47 阑夜风华 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 程序源码 #include <iostream> #include <complex> int main(){ using namespace std; complex<double> c1{3, 4}, c2{4.5}; const complex<double> c3{c2}; co 阅读全文
posted @ 2022-10-14 14:38 阑夜风华 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 1.实验任务1 task1_1 程序源码 #include<iostream> #include<string> #include<vector> int main() { using namespace std; string s1; string s2{"c plus plus"}; strin 阅读全文
posted @ 2022-10-03 18:24 阑夜风华 阅读(14) 评论(0) 推荐(0) 编辑