yy-L886

导航

2022年12月6日 #

实验六 模板和文件IO

摘要: task 3_1 1 #include <iostream> 2 #include <fstream> 3 #include <array> 4 #define N 5 5 6 int main() { 7 using namespace std; 8 9 array<int, N> x {97, 阅读全文

posted @ 2022-12-06 16:47 小猪葛屁了 阅读(12) 评论(0) 推荐(0) 编辑

2022年11月29日 #

实验五 多态和继承

摘要: 1 #pragma ocne 2 #include<iostream> 3 #include<string> 4 using namespace std; 5 class MachinePets 6 { 7 string nickname; 8 public: 9 MachinePets(const 阅读全文

posted @ 2022-11-29 19:27 小猪葛屁了 阅读(14) 评论(0) 推荐(0) 编辑

2022年11月8日 #

实验四类和对象数组及指针

摘要: 1 1 #pragma once 2 2 #include<iostream> 3 3 4 4 using std::cout; 5 5 using std::endl; 6 6 7 7 class vectorInt { 8 8 public: 9 9 //构造函数和析构函数 10 10 vect 阅读全文

posted @ 2022-11-08 17:53 小猪葛屁了 阅读(4) 评论(0) 推荐(0) 编辑

2022年10月25日 #

实验三

摘要: 1 #include <iostream> 2 #include <string> 3 #include <iomanip> 4 using namespace std; 5 class Info 6 { 7 public: 8 Info() {} 9 Info(string x, string y 阅读全文

posted @ 2022-10-25 17:07 小猪葛屁了 阅读(3) 评论(0) 推荐(0) 编辑

2022年10月18日 #

实验二 类和对象(二)

摘要: 1 #include <iostream> 2 #include <complex> 3 int main() 4 { 5 using namespace std; 6 complex<double> c1{3, 4}, c2{4.5}; 7 const complex<double> c3{c2} 阅读全文

posted @ 2022-10-18 17:49 小猪葛屁了 阅读(17) 评论(0) 推荐(0) 编辑